diff --git a/src/flow.ts b/src/flow.ts
index cdef66a..83ce7e9 100644
--- a/src/flow.ts
+++ b/src/flow.ts
@@ -1,8 +1,7 @@
-import { Apps } from './types.ts'
+import { App } from './types.ts'
class Flow {
- apps: Apps = {}
-
+ apps: App[] = []
appList = [
'settings',
'music',
@@ -20,7 +19,7 @@ class Flow {
const app = new ImportedApp()
window.preloader.setStatus(`importing default apps\n${appPath}`)
- this.apps[app.pkg] = app
+ this.add(app)
}
window.wm.launcher.style.opacity = '0'
@@ -29,16 +28,16 @@ class Flow {
window.preloader.setStatus('adding apps to app launcher...')
- for (const pkg in window.flow.apps) {
- window.preloader.setStatus(`adding apps to app launcher\n${window.flow.apps[pkg].name}`)
- const app = document.createElement('app')
- app.onclick = async () => {
- await window.flow.openApp(pkg)
+ this.apps.forEach((app) => {
+ window.preloader.setStatus(`adding apps to app launcher\n${app.name}`)
+ const appElement = document.createElement('app')
+ appElement.onclick = async () => {
+ await window.flow.openApp(app.pkg)
window.wm.toggleLauncher()
}
- app.innerHTML = `