commit
Add a Public header section for API docs and metrics
Replaces the Metrics link with Public, after Owner and Admin, opening a signed-in /user/dash with tiles for the API docs and metrics. The API docs tile moves off the admin dashboard. Co-Authored-By: Sandrone <[email protected]>
diff --git a/src/lib/components/Header.svelte b/src/lib/components/Header.svelte
index fc390c7..0907934 100644
--- a/src/lib/components/Header.svelte
+++ b/src/lib/components/Header.svelte
@@ -31,9 +31,6 @@
<span class="who">Signed in as <strong>{auth.displayName}</strong></span>
{/if}
{#if auth.signedIn}
- <a href="/user/metrics">
- <iconsax-icon name="chart-2" type="bulk" size="24" class="nav-icon"></iconsax-icon>Metrics
- </a>
{#if auth.isOwner}
<a href="/owner/dash">
<iconsax-icon name="crown" type="bulk" size="24" class="nav-icon"></iconsax-icon>Owner
@@ -44,6 +41,9 @@
<iconsax-icon name="setting-2" type="bulk" size="24" class="nav-icon"></iconsax-icon>Admin
</a>
{/if}
+ <a href="/user/dash">
+ <iconsax-icon name="global" type="bulk" size="24" class="nav-icon"></iconsax-icon>Public
+ </a>
<a href="/user/profile">
<iconsax-icon name="user" type="bulk" size="24" class="nav-icon"></iconsax-icon>Profile
</a>
diff --git a/src/routes/admin/dash/+page.svelte b/src/routes/admin/dash/+page.svelte
index 5b3b0c1..3633cf8 100644
--- a/src/routes/admin/dash/+page.svelte
+++ b/src/routes/admin/dash/+page.svelte
@@ -129,11 +129,6 @@
<p>{page.desc}</p>
</a>
{/each}
- <a class="tile" href="/user/docs">
- <span class="tile-icon"><iconsax-icon name="driver" type="bulk" size="22"></iconsax-icon></span>
- <h3>API endpoints</h3>
- <p>OpenAPI spec for this site</p>
- </a>
</div>
</div>
</Protected>
diff --git a/src/routes/user/dash/+page.svelte b/src/routes/user/dash/+page.svelte
new file mode 100644
index 0000000..33398cc
--- /dev/null
+++ b/src/routes/user/dash/+page.svelte
@@ -0,0 +1,41 @@
+<!-- src/routes/user/dash/+page.svelte
+ Copyright (c) 2026 Clove Nytrix Doughmination Twilight
+ Licensed under the DASL-1.2 Licence.
+ See LICENCE.md in the project root for full licence information.
+-->
+
+<script lang="ts">
+ import Protected from "#lib/components/Protected.svelte";
+ import PageHead from "#lib/components/PageHead.svelte";
+</script>
+
+<svelte:head>
+ <title>Public dashboard · Doughmination System</title>
+</svelte:head>
+
+<Protected>
+ <div class="page">
+ <PageHead
+ eyebrow="Public"
+ title="Public dashboard"
+ subtitle="For every signed-in user"
+ back={{
+ href: "/",
+ label: "Back to home",
+ }}
+ />
+
+ <div class="tiles">
+ <a class="tile" href="/user/docs">
+ <span class="tile-icon"><iconsax-icon name="driver" type="bulk" size="22"></iconsax-icon></span>
+ <h3>API docs</h3>
+ <p>Every endpoint on this site</p>
+ </a>
+ <a class="tile" href="/user/metrics">
+ <span class="tile-icon"><iconsax-icon name="chart-2" type="bulk" size="22"></iconsax-icon></span>
+ <h3>Metrics</h3>
+ <p>Fronting and switching statistics</p>
+ </a>
+ </div>
+ </div>
+</Protected>