From b72aea97476ad50427f5acfe0095e0678509056f Mon Sep 17 00:00:00 2001 From: Tim McCarthy Date: Fri, 12 Jun 2026 01:47:56 -0700 Subject: [PATCH] Combine Rules and Admin corner links into one upper-right menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the fixed Rules link (upper-left) and the creator-only Admin link (upper-right) with a single collapsible ☰ Menu in the upper right, leaving the event log alone in its corner. CornerMenu always lists the Rules link; pages can contribute context-specific entries through the extraMenuLinks store, which Dashboard uses for the creator-only Admin link. This gives future misc sub-pages a home without eating more screen corners. Co-Authored-By: Claude Fable 5 --- frontend/src/App.svelte | 24 +------ frontend/src/components/CornerMenu.svelte | 87 +++++++++++++++++++++++ frontend/src/lib/menu.js | 6 ++ frontend/src/pages/Dashboard.svelte | 33 +++------ 4 files changed, 105 insertions(+), 45 deletions(-) create mode 100644 frontend/src/components/CornerMenu.svelte create mode 100644 frontend/src/lib/menu.js diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 65e5268..5585028 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -4,6 +4,7 @@ import Join from './pages/Join.svelte'; import Dashboard from './pages/Dashboard.svelte'; import Admin from './pages/Admin.svelte'; + import CornerMenu from './components/CornerMenu.svelte'; const routes = { '/': Home, @@ -15,26 +16,5 @@
- 📖 Rules +
- - diff --git a/frontend/src/components/CornerMenu.svelte b/frontend/src/components/CornerMenu.svelte new file mode 100644 index 0000000..9bcd496 --- /dev/null +++ b/frontend/src/components/CornerMenu.svelte @@ -0,0 +1,87 @@ + + + + +
+ + {#if open} + + {/if} +
+ + diff --git a/frontend/src/lib/menu.js b/frontend/src/lib/menu.js new file mode 100644 index 0000000..25fecbd --- /dev/null +++ b/frontend/src/lib/menu.js @@ -0,0 +1,6 @@ +import { writable } from 'svelte/store'; + +// Extra entries for the corner menu, set by pages that have context-specific +// links (e.g. Dashboard adds the creator-only Admin link). Each entry is +// { label, href, external?, title? }. +export const extraMenuLinks = writable([]); diff --git a/frontend/src/pages/Dashboard.svelte b/frontend/src/pages/Dashboard.svelte index 55b5297..bfdc10c 100644 --- a/frontend/src/pages/Dashboard.svelte +++ b/frontend/src/pages/Dashboard.svelte @@ -1,7 +1,8 @@ @@ -65,10 +74,6 @@ - - {#if state.player.is_creator} - 🛠️ Admin - {/if} {:else if !error}

Loading game state...

@@ -76,24 +81,6 @@ {/if}