chore: [frontend] Update the API client gen code
This commit is contained in:
parent
dd069c470e
commit
50229dfbac
2 changed files with 29 additions and 1 deletions
|
|
@ -1,6 +1,12 @@
|
|||
<script lang="ts">
|
||||
import { page } from '$app/state';
|
||||
|
||||
interface Props {
|
||||
isAdmin?: boolean;
|
||||
}
|
||||
|
||||
const { isAdmin = false }: Props = $props();
|
||||
|
||||
const isActive = (prefix: string) => page.url.pathname.startsWith(prefix);
|
||||
</script>
|
||||
|
||||
|
|
@ -22,6 +28,16 @@
|
|||
Articles
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="/app/packs"
|
||||
class="nav-link"
|
||||
class:is-active={isActive('/app/packs')}
|
||||
aria-current={isActive('/app/packs') ? 'page' : undefined}
|
||||
>
|
||||
Packs
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="/app/profile"
|
||||
|
|
@ -32,6 +48,18 @@
|
|||
Profile
|
||||
</a>
|
||||
</li>
|
||||
{#if isAdmin}
|
||||
<li>
|
||||
<a
|
||||
href="/app/admin/packs"
|
||||
class="nav-link"
|
||||
class:is-active={isActive('/app/admin')}
|
||||
aria-current={isActive('/app/admin') ? 'page' : undefined}
|
||||
>
|
||||
Admin
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue