Add ISAC user operations and access roles
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user