2024-02-21 20:10:42 -08:00
|
|
|
import Camera from './Camera/Camera.svelte'
|
2024-02-21 23:36:24 -08:00
|
|
|
import MusicBrowser from './MusicBrowser/MusicBrowser.svelte'
|
2024-02-24 01:38:00 -08:00
|
|
|
import Settings from './Settings/Settings.svelte'
|
2024-02-21 20:10:42 -08:00
|
|
|
|
2024-02-24 19:36:19 -08:00
|
|
|
type Format = 'png' | 'jpg' | 'webp'
|
|
|
|
const resolveIconPath = (slug: keyof typeof appList, format: Format) => {
|
|
|
|
return `/static/app-icons/${slug}.${format}`
|
|
|
|
}
|
|
|
|
|
|
|
|
import GBAEmulator from './GBAEmulator/GBAEmulator.svelte'
|
|
|
|
|
|
|
|
interface AppList {
|
|
|
|
[key: string]: {
|
|
|
|
name: string
|
|
|
|
component: any
|
|
|
|
icon: string
|
|
|
|
external: boolean
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export const appList: AppList = {
|
2024-02-21 20:10:42 -08:00
|
|
|
'camera': {
|
|
|
|
name: 'Camera',
|
|
|
|
component: Camera,
|
2024-02-24 19:36:19 -08:00
|
|
|
icon: resolveIconPath('camera', 'png'),
|
|
|
|
external: false,
|
2024-02-21 20:10:42 -08:00
|
|
|
},
|
|
|
|
'media-player': {
|
|
|
|
name: 'Media Player',
|
|
|
|
component: MusicBrowser,
|
2024-02-24 19:36:19 -08:00
|
|
|
icon: resolveIconPath('media-player', 'png'),
|
|
|
|
external: false,
|
2024-02-21 20:10:42 -08:00
|
|
|
},
|
2024-02-24 01:38:00 -08:00
|
|
|
'settings': {
|
|
|
|
name: 'Settings',
|
|
|
|
component: Settings,
|
2024-02-24 19:36:19 -08:00
|
|
|
icon: resolveIconPath('settings', 'webp'),
|
|
|
|
external: false,
|
|
|
|
},
|
|
|
|
'gba-emulator': {
|
|
|
|
name: 'GBA Emulator',
|
|
|
|
component: GBAEmulator,
|
|
|
|
icon: resolveIconPath('gba-emulator', 'png'),
|
|
|
|
external: true,
|
2024-02-24 01:38:00 -08:00
|
|
|
},
|
2024-02-21 20:10:42 -08:00
|
|
|
}
|