feat(admin): responsive entity nav and collapsible list panels (Phase 9)

EntityNav: hidden on mobile, 48px icon strip at tablet (md), full labels+counts at desktop (lg).
Each list panel collapses to a 32px handle via localStorage-persisted state; auto-collapses when
navigating to the "+New" route. Mobile routing hides the list panel when a detail route is active.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-03-30 07:19:41 +02:00
parent 06a489567a
commit 3c54401bb2
14 changed files with 540 additions and 178 deletions

View File

@@ -1,12 +1,17 @@
<script lang="ts">
import { page } from '$app/state';
import GroupsListPanel from './GroupsListPanel.svelte';
let { data, children } = $props();
const autoCollapse = $derived(page.url.pathname === '/admin/groups/new');
const isAtListRoot = $derived(page.url.pathname === '/admin/groups');
</script>
<GroupsListPanel groups={data.groups} />
<div class="{isAtListRoot ? 'flex' : 'hidden'} flex-shrink-0 md:flex">
<GroupsListPanel groups={data.groups} autocollapse={autoCollapse} />
</div>
<!-- Detail panel -->
<div class="flex min-w-0 flex-1 flex-col overflow-hidden">
<div class="{isAtListRoot ? 'hidden' : 'flex'} min-w-0 flex-1 flex-col overflow-hidden md:flex">
{@render children()}
</div>