Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c19af20
build out assets section
lucassshanks Sep 2, 2025
7f5a526
toggle+card
lucassshanks Sep 3, 2025
c5328bc
nits
lucassshanks Sep 3, 2025
de8ad11
nits
lucassshanks Sep 5, 2025
a868c9f
add button
lucassshanks Sep 5, 2025
90c2a0a
stupid mistake fix
lucassshanks Sep 5, 2025
59bae1d
add filter
lucassshanks Sep 7, 2025
cc0d9d5
stuff
lucassshanks Sep 10, 2025
6cef2c7
Merge branch 'main' into assets-page-template
lucassshanks Sep 17, 2025
745f6a1
fixing some stupid things from previous PR in login flow
lucassshanks Sep 17, 2025
afc156b
update this bad login flow to actually use svelte shallow routing
lucassshanks Sep 17, 2025
165dc7c
done with nav for a while
lucassshanks Sep 17, 2025
6a95bab
Merge branch 'main' into assets-page-template
lucassshanks Sep 19, 2025
2fca3f7
add webauthn to settings page. todo fix some stuff
lucassshanks Sep 19, 2025
a30f0c1
need to fix a bunch of routing, Also check that auth data is loaded w…
lucassshanks Sep 22, 2025
6c8cd5b
move all this logic to the layout since client side anyways
lucassshanks Sep 23, 2025
3333b6e
Merge branch 'main' into assets-page-template
lucassshanks Sep 23, 2025
0c188ce
random spelling mistake in contributing
lucassshanks Sep 23, 2025
5680205
update some flows
lucassshanks Sep 25, 2025
2acd52b
Merge branch 'main' into assets-page-template
lucassshanks Sep 25, 2025
4a48ff3
2fa
lucassshanks Sep 28, 2025
c6b2b57
Merge branch 'main' into assets-page-template
lucassshanks Sep 28, 2025
c16fcdb
committing for merge
lucassshanks Sep 28, 2025
4f7a799
Merge branch 'main' into assets-page-template
lucassshanks Sep 28, 2025
a6ec90e
before updating this component
lucassshanks Sep 30, 2025
2de7956
fix card format to be more svelte like
lucassshanks Sep 30, 2025
3f0a24a
feat(dashboard): improve grpc error handling
lennartkloock Oct 1, 2025
4cd9c3d
committing working modal flow need to add webauth
lucassshanks Oct 2, 2025
ba6f3f7
fix(dashboard): rpcErrorToString
lennartkloock Oct 2, 2025
48bc262
fix(core): exlude google rpc from tinc compiling
lennartkloock Oct 3, 2025
9f21c80
fix: pb build files
lennartkloock Oct 3, 2025
b56ca97
docs: add pb build file comments
lennartkloock Oct 3, 2025
25dcb37
Merge branch 'main' into assets-page-template
lucassshanks Oct 4, 2025
75eb0d2
fix page errors
lucassshanks Oct 4, 2025
d4ff83b
update svelte for tanstack v6
lucassshanks Oct 5, 2025
1fef5bf
use tanstack add eror handling
lucassshanks Oct 5, 2025
07a3eec
commiting current and removing msw
lucassshanks Oct 9, 2025
d0ce9e3
remove msw and test flow
lucassshanks Oct 9, 2025
f17b087
add tanstack to show how simplifies flow in 2fa page
lucassshanks Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ for a Bazel LSP you can use the Bazel extension for VSCode and download [starpls

### Environment Variables

We advice you to use [direnv](https://direnv.net/) to load the `.envrc` file, which sets up a few environment variables needed for development.
We advise you to use [direnv](https://direnv.net/) to load the `.envrc` file, which sets up a few environment variables needed for development.

### Nix

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
style="width: 310px; border-style: solid; border-width: thin; border-color: #E6DEDB; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; padding: 24px; background-color: #FAF5F1;">
<div
style="font-family: 'Archivo', sans-serif; font-size: 24px; font-weight: 700; line-height: 32px; color: #272626;">
Thanks for singing up for Scuffle!
Thanks for signing up for Scuffle!
</div>
<div
style="font-family: 'Archivo', sans-serif; margin-top: 16px; font-size: 16px; font-weight: 500; line-height: 24px; color: #272626;">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Thanks for singing up for Scuffle! Click the link below to access your Scuffle account.
Thanks for signing up for Scuffle! Click the link below to access your Scuffle account.
<%= self.url %>
The link is valid for <%= self.timeout_minutes %> minutes.

Expand Down
1 change: 0 additions & 1 deletion cloud/dashboard/.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Default Public Variables
# If you want to modify any of the values, create an .env.local file to override them.

PUBLIC_VITE_MSW_ENABLED=true
PUBLIC_TURNSTILE_SITE_KEY=1x00000000000000000000AA
# The default developement deployment we use right now.
PUBLIC_GRPC_BASE_URL=https://core.lennart.scuf.dev/
1 change: 0 additions & 1 deletion cloud/dashboard/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export default tsEslint.config(
"**/build",
"**/node_modules",
"**/package",
"static/mockServiceWorker.js",
],
},
);
11 changes: 3 additions & 8 deletions cloud/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
"@melt-ui/pp": "^0.3.2",
"@melt-ui/svelte": "^0.86.4",
"@protobuf-ts/grpcweb-transport": "^2.11.1",
"@protobuf-ts/runtime": "^2.11.1",
"@protobuf-ts/runtime-rpc": "^2.11.1",
"@scufflecloud/proto": "workspace:*",
"@sveltejs/adapter-static": "^3.0.8",
"@sveltejs/kit": "^2.16.0",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@tanstack/svelte-query": "^5.62.2",
"@tanstack/svelte-query": "^6.0.0",
"@types/d3-geo": "^3.1.0",
"@types/lodash": "^4.17.16",
"d3-geo": "^3.1.1",
Expand All @@ -30,8 +31,7 @@
"globals": "^16.0.0",
"lodash": "^4.17.21",
"melt": "^0.17.8",
"msw": "^2.7.3",
"svelte": "^5.16.0",
"svelte": "^5.39.8",
"svelte-echarts": "^1.0.0",
"svelte-eslint-parser": "^0.43.0",
"svelte-turnstile": "^0.11.0",
Expand All @@ -41,10 +41,5 @@
},
"dependenciesComments": {
"svelte-eslint-parser": "New version has errors with `pnpm lint`. Can resolve later."
},
"msw": {
"workerDirectory": [
"static"
]
}
}
4 changes: 4 additions & 0 deletions cloud/dashboard/src/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ declare global {
// interface PageData {}
// interface PageState {}
// interface Platform {}
interface PageState {
loginMode?: import("$lib/types").LoginMode;
userEmail?: string;
}
}
}

Expand Down
109 changes: 109 additions & 0 deletions cloud/dashboard/src/components/assets/all-assets.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<script lang="ts">
import SearchInput from "$components/search-input.svelte";
import IconLayout_3 from "$lib/images/icon-layout-3.svelte";
import IconLayout from "$lib/images/icon-layout.svelte";
import AssetCard from "./asset-card.svelte";
import Header from "./assets-header.svelte";
import SlidingToggle from "./sliding-toggle.svelte";
import TimeFilterDropdown from "./time-filter-dropdown.svelte";
import { DISPLAY_MODES } from "./types";

// Search functionality
let searchQuery = $state("");
let displayMode = $state(DISPLAY_MODES.GRID);

// These will come from a paginated response
const streams = [
{
status: "Live",
streamName: "unique-stream-name",
streamId: "8a28e499d6s7987fd981293fd981293",
startTime: "May 5, 04:01:11 PM EDT",
duration: "1h 30min",
endTime: "May 6, 04:01:11 PM EDT",
},
{
status: "Live",
streamName: "unique-stream-name",
streamId: "8a28e499d6s7987fd981293fd981293",
startTime: "May 5, 04:01:11 PM EDT",
duration: "1h 30min",
endTime: "May 6, 04:01:11 PM EDT",
},
{
status: "Finished",
streamName: "unique-stream-name",
streamId: "8a28e499d6s7987fd981293fd981293",
startTime: "May 5, 04:01:11 PM EDT",
duration: "1h 30min",
endTime: "May 6, 04:01:11 PM EDT",
},
{
status: "Finished",
streamName: "unique-stream-name",
streamId: "8a28e499d6s7987fd981293fd981293",
startTime: "May 5, 04:01:11 PM EDT",
duration: "1h 30min",
endTime: "May 6, 04:01:11 PM EDT",
},
];

function handleDisplayModeToggle() {
if (displayMode === DISPLAY_MODES.GRID) {
displayMode = DISPLAY_MODES.LIST;
} else {
displayMode = DISPLAY_MODES.GRID;
}
}

let selectedTimeFilter = $state("latest");

function handleTimeFilterChange(filterId: string) {
selectedTimeFilter = filterId;
}
</script>

<Header />
<div class="search-row">
<SearchInput bind:value={searchQuery} placeholder="Search..." />
<TimeFilterDropdown
selectedFilter={selectedTimeFilter}
onFilterChange={handleTimeFilterChange}
/>
<SlidingToggle
leftLabel={IconLayout}
rightLabel={IconLayout_3}
value={displayMode === DISPLAY_MODES.GRID ? "left" : "right"}
onToggle={handleDisplayModeToggle}
/>
</div>
<div class="separator"></div>
<div class="card-container">
{#each streams as stream, i (i)}
<AssetCard {...stream} />
{/each}
</div>

<div class="separator"></div>

<style>
.card-container {
display: flex;
flex-direction: column;
gap: 0.5rem;
}

.separator {
height: 1px;
background-color: var(--colors-gray50);
margin: 1.5rem 0;
}

.search-row {
display: flex;
justify-content: space-between;
margin-bottom: 1.5rem;
gap: 0.5rem;
height: 2.5rem;
}
</style>
125 changes: 125 additions & 0 deletions cloud/dashboard/src/components/assets/asset-card.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<script lang="ts">
import IconTimelineDot from "$lib/images/icon-timeline-dot.svelte";
import IconWebhook from "$lib/images/icon-webhook.svelte";
import StreamStatusPill from "$lib/shared-components/stream-status-pill.svelte";

let {
streamName = "unique-stream-name",
streamId = "8a28e499d6s7987fd981293fd981293",
startTime = "May 5, 04:01:11 PM EDT",
duration = "1h 30min",
endTime = "May 6, 04:01:11 PM EDT",
} = $props();

// const statusIcon = {
// live: IconRoadmapDot,
// finished: IconRoadmapDot,
// };

// const IconComponent = statusIcon[status as keyof typeof statusIcon];
</script>

<div class="stream-card">
<div class="left-section">
<div class="status-section">
<IconWebhook />
<StreamStatusPill status="live" />
<h3 class="stream-name">{streamName}</h3>
</div>
<div class="stream-details">
<p class="stream-id">{streamId}</p>
</div>
</div>
<div class="right-section">
<div class="start-time">
<span class="time">{startTime}</span>
<IconTimelineDot variant="default" />
</div>
<div class="time-divider"></div>
<div class="end-time">
<span class="duration">{duration}</span>
<span class="time">{endTime}</span>
<IconTimelineDot variant="finished" />
</div>
</div>
</div>

<style>
.stream-card {
background: var(--colors-gray20);
border-radius: 0.75rem;
padding: 0.75rem;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
transition: background-color 0.2s ease;
}

.left-section {
display: flex;
flex-direction: column;
gap: 1rem;

.status-section {
display: flex;
flex-direction: row;
gap: 0.5rem;
align-items: center;

.stream-name {
color: white;
font-weight: 500;
font-size: 0.875rem;
margin: 0;
}
}
}

.stream-details {
display: flex;
flex-direction: column;
}

.stream-id {
color: #9ca3af;
font-size: 0.75rem;
margin: 0;
}

.right-section {
display: flex;
flex-direction: column;
align-items: flex-end;
text-align: right;
justify-content: center;

.start-time {
font-size: 0.875rem;
font-style: normal;
font-weight: 600;
line-height: 1rem;
color: #282625;
display: flex;
gap: 0.5rem;
}

.time-divider {
width: 0.125rem;
align-self: right;
height: 1rem;
background-color: var(--colors-gray50);
margin-right: 0.3rem;
}

.end-time {
font-size: 0.875rem;
font-style: normal;
font-weight: 600;
line-height: 1rem;
color: #282625;
display: flex;
gap: 0.5rem;
}
}
</style>
Loading
Loading