Add ISAC user operations and access roles

This commit is contained in:
JB
2026-07-24 23:21:28 -04:00
parent 8ecdfaa319
commit 472528f429
21 changed files with 355 additions and 49 deletions
+4 -3
View File
@@ -3,8 +3,9 @@
import PendingForm from '$lib/components/PendingForm.svelte';
import type { Snippet } from 'svelte';
let { user, children }: {
let { user, isacAccess, children }: {
user: { username: string; role: string } | null;
isacAccess: boolean;
children: Snippet;
} = $props();
@@ -26,8 +27,8 @@
{#if user}
<a class:active={page.url.pathname.startsWith('/account')} href="/account">My Profile</a>
{/if}
{#if user?.role === 'admin'}
<a class:active={page.url.pathname.startsWith('/admin')} href="/admin/stats">Admin</a>
{#if isacAccess}
<a class:active={page.url.pathname.startsWith('/admin')} href="/admin">ISAC</a>
{/if}
</nav>
{#if user}