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}