From 584d80fe389813355203315fc162f86de75b2987 Mon Sep 17 00:00:00 2001 From: FIameCaster <82079841+FIameCaster@users.noreply.github.com> Date: Sun, 22 Oct 2023 23:51:23 +0200 Subject: [PATCH] =?UTF-8?q?[=F0=9F=90=9B]=20Fix=20app=20icons=20not=20load?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/apps.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/apps.ts b/src/plugins/apps.ts index 3f5d960..f17b3ef 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 @@ -20,7 +20,7 @@ export const run = (element: HTMLDivElement): void => { appIcon.style.background = 'var(--surface-0)' appIcon.style.padding = '5px 7.5px' appIcon.style.borderRadius = '5px' - appIcon.innerHTML = ` ${app.meta.name}` + appIcon.innerHTML = ` ${app.meta.name}` appIcon.onclick = async () => { const win = await e.detail.win win.focus() @@ -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()