jankboard/client/src/lib/Apps/appList.ts

47 lines
1.1 KiB
TypeScript
Raw Normal View History

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
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,
icon: resolveIconPath('camera', 'png'),
external: false,
2024-02-21 20:10:42 -08:00
},
'media-player': {
name: 'Media Player',
component: MusicBrowser,
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,
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
}