frontend: improve launch UI and refactor stream to new page
This commit is contained in:
@@ -1,12 +1,7 @@
|
||||
<script lang="ts">
|
||||
import Cover from './Cover.svelte';
|
||||
import { fetchApps } from './apps';
|
||||
|
||||
interface App {
|
||||
title: string;
|
||||
id: number;
|
||||
hdr_supported: boolean;
|
||||
}
|
||||
import type { App } from './apps';
|
||||
|
||||
interface AppsResponse {
|
||||
apps: Record<string, App[]>;
|
||||
@@ -14,15 +9,6 @@
|
||||
|
||||
let appsPromise: Promise<AppsResponse>;
|
||||
|
||||
//async function fetchApps() {
|
||||
// console.log('apps');
|
||||
// const response = await fetch('/api/apps');
|
||||
// console.log(response);
|
||||
// const data = (await response.json()) as AppsResponse;
|
||||
// console.log(data);
|
||||
// return data;
|
||||
//}
|
||||
|
||||
appsPromise = fetchApps();
|
||||
</script>
|
||||
|
||||
@@ -31,8 +17,8 @@
|
||||
{:then resp}
|
||||
<div class="apps-container">
|
||||
{#each Object.entries(resp.apps) as [server_name, apps]}
|
||||
{#each apps as app}
|
||||
<Cover {app} {server_name}></Cover>
|
||||
{#each apps as app, tab_index}
|
||||
<Cover {app} {server_name} {tab_index}></Cover>
|
||||
{/each}
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user