Skip to content

Commit a6113c2

Browse files
committed
added tabs and scroll area shadcn components. changing the layout.css to match CMI colors and adding node_modules to gitignore
1 parent 2397857 commit a6113c2

6 files changed

Lines changed: 382 additions & 144 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.ruff_cache
22
.DS_Store
3+
node_modules/
34

45
# Frontend static build output
56
src/MoBI_View/web/static/

frontend/package-lock.json

Lines changed: 166 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
},
1616
"devDependencies": {
1717
"@fontsource-variable/inter": "^5.2.8",
18+
"@internationalized/date": "^3.12.1",
1819
"@lucide/svelte": "^1.14.0",
1920
"@sveltejs/adapter-static": "^3.0.10",
2021
"@sveltejs/kit": "^2.57.0",
2122
"@sveltejs/vite-plugin-svelte": "^7.0.0",
2223
"@tailwindcss/vite": "^4.2.2",
2324
"@types/node": "^25.6.0",
25+
"bits-ui": "^2.18.1",
2426
"clsx": "^2.1.1",
2527
"prettier": "^3.8.3",
2628
"prettier-plugin-svelte": "^3.5.1",

frontend/src/routes/+layout.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
/** This is the layout file */
12
export const prerender = true;

frontend/src/routes/+page.svelte

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<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+
);
39
</script>
410

511
<svelte:head>
@@ -10,31 +16,25 @@
1016
/>
1117
</svelte:head>
1218

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>
3125

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

Comments
 (0)