From 7a728fca7020a8e5fa18a224a25c7683d20933ee Mon Sep 17 00:00:00 2001 From: proudparrot2 Date: Wed, 25 Oct 2023 07:31:08 -0500 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9F=90=9B]=20Fixed=20ts-expect-error=20?= =?UTF-8?q?giving=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/apps.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/apps.ts b/src/plugins/apps.ts index 3f5d960..60ad755 100644 --- a/src/plugins/apps.ts +++ b/src/plugins/apps.ts @@ -12,7 +12,6 @@ export const run = (element: HTMLDivElement): void => { element.style.alignItems = 'center' element.style.gap = '5px' element.style.flex = '1' - // @ts-expect-error window.addEventListener('app_opened', (e: AppOpenedEvent): void => { const appIcon = document.createElement('app') const app = e.detail.app @@ -28,7 +27,6 @@ export const run = (element: HTMLDivElement): void => { } element.appendChild(appIcon) }) - // @ts-expect-error window.addEventListener('app_closed', (e: AppClosedEvent): void => { const win = e.detail.win element.querySelector(`img[data-id="${win.id}"]`)?.parentElement?.remove() From 4ed7251873c3b1940cbed72eb696cdcdf9c9bfda Mon Sep 17 00:00:00 2001 From: proudparrot2 Date: Wed, 25 Oct 2023 07:31:22 -0500 Subject: [PATCH 2/3] =?UTF-8?q?[=E2=9C=A8]=20Added=20type=20for=20FlowPlug?= =?UTF-8?q?in?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/types.ts b/src/types.ts index efc497f..ef39528 100644 --- a/src/types.ts +++ b/src/types.ts @@ -11,6 +11,18 @@ export interface AppOpenedEvent extends CustomEvent { } } +export interface FlowPlugin { + name: string + pkg: string + version?: string + authors?: string[] + + init: (data: any) => void | Promise + openWindow?: (data: any) => FlowWindow | Promise + addStatusbarItem: (data: any) => void | Promise + loadTheme: (data: any) => void | Promise +} + export interface AppClosedEvent extends CustomEvent { detail: { win: FlowWindow From 30a4e85f963914dffcdedd984f217db354a7f6c0 Mon Sep 17 00:00:00 2001 From: proudparrot2 Date: Wed, 25 Oct 2023 07:34:10 -0500 Subject: [PATCH 3/3] =?UTF-8?q?[=E2=86=A9=EF=B8=8F]=20Okay=20never=20mind?= =?UTF-8?q?=20it=20was=20supposed=20to=20be=20there?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/apps.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/apps.ts b/src/plugins/apps.ts index f17b3ef..384b82d 100644 --- a/src/plugins/apps.ts +++ b/src/plugins/apps.ts @@ -12,7 +12,7 @@ export const run = (element: HTMLDivElement): void => { element.style.alignItems = 'center' element.style.gap = '5px' element.style.flex = '1' - + // @ts-expect-error window.addEventListener('app_opened', (e: AppOpenedEvent): void => { const appIcon = document.createElement('app') const app = e.detail.app @@ -28,7 +28,7 @@ export const run = (element: HTMLDivElement): void => { } element.appendChild(appIcon) }) - + // @ts-expect-error window.addEventListener('app_closed', (e: AppClosedEvent): void => { const win = e.detail.win element.querySelector(`img[data-id="${win.id}"]`)?.parentElement?.remove()