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">
|
<script lang="ts">
|
||||||
import { page } from '$app/state';
|
import { page } from '$app/state';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
isAdmin?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { isAdmin = false }: Props = $props();
|
||||||
|
|
||||||
const isActive = (prefix: string) => page.url.pathname.startsWith(prefix);
|
const isActive = (prefix: string) => page.url.pathname.startsWith(prefix);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -22,6 +28,16 @@
|
||||||
Articles
|
Articles
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
<li>
|
||||||
<a
|
<a
|
||||||
href="/app/profile"
|
href="/app/profile"
|
||||||
|
|
@ -32,6 +48,18 @@
|
||||||
Profile
|
Profile
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</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>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue