Merge branch 'feat/mobile-admin-entry' into chore/reconcile-ui-review

This commit is contained in:
MechaCat02
2026-06-25 21:13:55 +02:00
3 changed files with 34 additions and 3 deletions

View File

@@ -82,7 +82,9 @@
label: 'Account',
href: '/profile/account',
icon: User,
match: ['/profile', '/profile/preferences']
// `/admin` keeps the Account tab highlighted while an admin is in
// the admin area — its only mobile entry point is the Account hub.
match: ['/profile', '/profile/preferences', '/admin']
}
];

View File

@@ -10,6 +10,7 @@
import SlidersHorizontal from '@lucide/svelte/icons/sliders-horizontal';
import KeyRound from '@lucide/svelte/icons/key-round';
import LogOut from '@lucide/svelte/icons/log-out';
import Shield from '@lucide/svelte/icons/shield';
import ChevronRight from '@lucide/svelte/icons/chevron-right';
let currentPassword = $state('');
@@ -193,6 +194,18 @@
</button>
</div>
{#if session.user.is_admin}
<!-- Admin is reachable from the desktop header; the mobile chrome
has no Admin tab, so the Account hub is its entry point. -->
<div class="row-group">
<a class="row" href="/admin" data-testid="account-row-admin">
<Shield size={18} aria-hidden="true" />
<span class="row-label">Admin</span>
<ChevronRight size={16} aria-hidden="true" class="row-chev" />
</a>
</div>
{/if}
<div class="row-group">
<button
type="button"