From b783dae5f487d9a00a5564787f329cf608e3dbbe Mon Sep 17 00:00:00 2001 From: Admin Date: Sat, 28 Mar 2026 21:15:49 +0500 Subject: [PATCH] refactor(admin): replace tab bar with sidebar layout Move admin navigation from a two-row tab strip into a persistent left sidebar with grouped sections (Pages / Tools). Consolidate Scrape and Audio entries in the global top nav into a single Admin link. --- ui/src/routes/+layout.svelte | 58 +++++++-------------- ui/src/routes/admin/+layout.svelte | 81 ++++++++++++++++++------------ 2 files changed, 67 insertions(+), 72 deletions(-) diff --git a/ui/src/routes/+layout.svelte b/ui/src/routes/+layout.svelte index 71a417b..5808fd1 100644 --- a/ui/src/routes/+layout.svelte +++ b/ui/src/routes/+layout.svelte @@ -257,20 +257,14 @@
- {#if data.user?.role === 'admin'} - - - {/if} + {#if data.user?.role === 'admin'} + + {/if} - {#if data.user?.role === 'admin'} -
-

Admin

- (menuOpen = false)} - class="px-3 py-2.5 rounded-lg text-sm font-medium transition-colors {page.url.pathname.startsWith('/admin/scrape') ? 'bg-zinc-800 text-zinc-100' : 'text-zinc-400 hover:bg-zinc-800 hover:text-zinc-100'}" - > - Scrape tasks - - (menuOpen = false)} - class="px-3 py-2.5 rounded-lg text-sm font-medium transition-colors {page.url.pathname === '/admin/audio' ? 'bg-zinc-800 text-zinc-100' : 'text-zinc-400 hover:bg-zinc-800 hover:text-zinc-100'}" - > - Audio cache - - (menuOpen = false)} - class="px-3 py-2.5 rounded-lg text-sm font-medium transition-colors {page.url.pathname.startsWith('/admin/audio-jobs') ? 'bg-zinc-800 text-zinc-100' : 'text-zinc-400 hover:bg-zinc-800 hover:text-zinc-100'}" - > - Audio jobs - - {/if} + {#if data.user?.role === 'admin'} +
+

Admin

+ (menuOpen = false)} + class="px-3 py-2.5 rounded-lg text-sm font-medium transition-colors {page.url.pathname.startsWith('/admin') ? 'bg-zinc-800 text-zinc-100' : 'text-zinc-400 hover:bg-zinc-800 hover:text-zinc-100'}" + > + Admin panel + + {/if}