[🐛] Fixing weird template literal type errors
This commit is contained in:
parent
5800180579
commit
5e22b36c2f
3 changed files with 6 additions and 4 deletions
|
|
@ -12,7 +12,7 @@ export const run = (element: HTMLDivElement): void => {
|
||||||
element.style.alignItems = 'center'
|
element.style.alignItems = 'center'
|
||||||
element.style.gap = '5px'
|
element.style.gap = '5px'
|
||||||
element.style.flex = '1'
|
element.style.flex = '1'
|
||||||
|
// @ts-expect-error
|
||||||
window.addEventListener('app_opened', (e: AppOpenedEvent): void => {
|
window.addEventListener('app_opened', (e: AppOpenedEvent): void => {
|
||||||
const appIcon = document.createElement('app')
|
const appIcon = document.createElement('app')
|
||||||
const app = e.detail.app
|
const app = e.detail.app
|
||||||
|
|
@ -20,7 +20,7 @@ export const run = (element: HTMLDivElement): void => {
|
||||||
appIcon.style.background = 'var(--surface-0)'
|
appIcon.style.background = 'var(--surface-0)'
|
||||||
appIcon.style.padding = '5px 7.5px'
|
appIcon.style.padding = '5px 7.5px'
|
||||||
appIcon.style.borderRadius = '5px'
|
appIcon.style.borderRadius = '5px'
|
||||||
appIcon.innerHTML = `<img data-id="${win.id}" src="${app.meta.icon}"/> ${app.meta.name}`
|
appIcon.innerHTML = `<img data-id="${win.id}" src="${app.meta.id as string}"/> ${app.meta.name}`
|
||||||
appIcon.onclick = async () => {
|
appIcon.onclick = async () => {
|
||||||
const win = await e.detail.win
|
const win = await e.detail.win
|
||||||
win.focus()
|
win.focus()
|
||||||
|
|
@ -28,7 +28,7 @@ export const run = (element: HTMLDivElement): void => {
|
||||||
}
|
}
|
||||||
element.appendChild(appIcon)
|
element.appendChild(appIcon)
|
||||||
})
|
})
|
||||||
|
// @ts-expect-error
|
||||||
window.addEventListener('app_closed', (e: AppClosedEvent): void => {
|
window.addEventListener('app_closed', (e: AppClosedEvent): void => {
|
||||||
const win = e.detail.win
|
const win = e.detail.win
|
||||||
element.querySelector(`img[data-id="${win.id}"]`)?.parentElement?.remove()
|
element.querySelector(`img[data-id="${win.id}"]`)?.parentElement?.remove()
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
// @ts-expect-error
|
||||||
import flowIcon from './assets/flow.png'
|
import flowIcon from './assets/flow.png'
|
||||||
|
|
||||||
class Preloader {
|
class Preloader {
|
||||||
|
|
@ -7,7 +8,7 @@ class Preloader {
|
||||||
this.element = document.createElement('preloader')
|
this.element = document.createElement('preloader')
|
||||||
|
|
||||||
this.element.innerHTML = `
|
this.element.innerHTML = `
|
||||||
<img src="${flowIcon}" width="150px">
|
<img src="${flowIcon as string}" width="150px">
|
||||||
<div class="done"></div>
|
<div class="done"></div>
|
||||||
<div class="status"></div>
|
<div class="status"></div>
|
||||||
`
|
`
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ export interface FlowWindowConfig {
|
||||||
|
|
||||||
export interface App {
|
export interface App {
|
||||||
meta: {
|
meta: {
|
||||||
|
id: any
|
||||||
name: string
|
name: string
|
||||||
description: string
|
description: string
|
||||||
pkg: string
|
pkg: string
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue