|
1 | 1 | <script lang="ts"> |
2 | | - const websocketUrl = "ws://localhost:8765"; |
| 2 | + import { ScrollArea } from "$lib/components/ui/scroll-area/index.js"; |
| 3 | + import * as Tabs from "$lib/components/ui/tabs/index.js"; |
| 4 | +
|
| 5 | + const channels = Array.from( |
| 6 | + { length: 10 }, |
| 7 | + (_, index) => `Channel ${index + 1}`, |
| 8 | + ); |
3 | 9 | </script> |
4 | 10 |
|
5 | 11 | <svelte:head> |
|
10 | 16 | /> |
11 | 17 | </svelte:head> |
12 | 18 |
|
13 | | -<main class="shell"> |
14 | | - <section |
15 | | - class="flex w-full max-w-3xl items-center justify-between gap-6 rounded-lg border bg-card p-6 text-card-foreground shadow-sm max-sm:flex-col max-sm:items-start" |
16 | | - aria-labelledby="app-title" |
17 | | - > |
18 | | - <div> |
19 | | - <p class="mb-1 text-xs font-semibold text-muted-foreground uppercase"> |
20 | | - MoBI-View |
21 | | - </p> |
22 | | - <h1 id="app-title" class="text-3xl leading-tight font-semibold"> |
23 | | - Real-time stream visualization |
24 | | - </h1> |
25 | | - </div> |
26 | | - <p class="font-mono text-sm text-muted-foreground max-sm:break-all"> |
27 | | - Frontend scaffold ready for {websocketUrl} |
28 | | - </p> |
29 | | - </section> |
30 | | -</main> |
| 19 | +<main class="min-h-screen bg-background p-6 text-foreground"> |
| 20 | + <Tabs.Root value="channels" class="w-full max-w-md"> |
| 21 | + <Tabs.List aria-label="MoBI-View demo tabs"> |
| 22 | + <Tabs.Trigger value="channels">Channels</Tabs.Trigger> |
| 23 | + <Tabs.Trigger value="details">Details</Tabs.Trigger> |
| 24 | + </Tabs.List> |
31 | 25 |
|
32 | | -<style> |
33 | | - .shell { |
34 | | - min-height: 100vh; |
35 | | - display: grid; |
36 | | - place-items: center; |
37 | | - padding: 2rem; |
38 | | - box-sizing: border-box; |
39 | | - } |
40 | | -</style> |
| 26 | + <Tabs.Content value="channels" class="mt-4"> |
| 27 | + <ScrollArea class="h-64 rounded-md border"> |
| 28 | + <div class="p-4"> |
| 29 | + {#each channels as channel} |
| 30 | + <div class="py-2 text-sm">{channel}</div> |
| 31 | + {/each} |
| 32 | + </div> |
| 33 | + </ScrollArea> |
| 34 | + </Tabs.Content> |
| 35 | + |
| 36 | + <Tabs.Content value="details" class="mt-4 rounded-md border p-4 text-sm"> |
| 37 | + Select a channel to view stream details. |
| 38 | + </Tabs.Content> |
| 39 | + </Tabs.Root> |
| 40 | +</main> |
0 commit comments