Skip to content

Commit

Permalink
Prayge
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Apr 18, 2024
1 parent 9a809dc commit 426764f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
57 changes: 30 additions & 27 deletions src/lib/components/layout/Sidebar.svelte
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
<script lang="ts">
import { page } from '$app/stores';
import { UserSelfStore } from '$lib/stores/UserStore';
import { AppRail, AppRailAnchor } from '@skeletonlabs/skeleton';
</script>

<AppRail>
<svelte:fragment slot="lead">
<AppRailAnchor href="/home" selected={$page.url.pathname === '/home'}>
<i class="fa fa-house fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/shockers" selected={$page.url.pathname === '/shockers'}>
<i class="fa fa-bolt fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/devices" selected={$page.url.pathname === '/devices'}>
<i class="fa fa-microchip fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/sharelinks" selected={$page.url.pathname === '/sharelinks'}>
<i class="fa fa-link fa-2xl" />
</AppRailAnchor>
</svelte:fragment>
<svelte:fragment slot="trail">
<AppRailAnchor href="/tokens" selected={$page.url.pathname === '/tokens'}>
<i class="fa fa-key fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/account" selected={$page.url.pathname === '/account'}>
<i class="fa fa-user fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/admin" selected={$page.url.pathname === '/admin'}>
<i class="fa fa-user-shield fa-2xl" />
</AppRailAnchor>
</svelte:fragment>
</AppRail>
{#if $UserSelfStore}
<AppRail>
<svelte:fragment slot="lead">
<AppRailAnchor href="/home" selected={$page.url.pathname === '/home'}>
<i class="fa fa-house fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/shockers" selected={$page.url.pathname === '/shockers'}>
<i class="fa fa-bolt fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/devices" selected={$page.url.pathname === '/devices'}>
<i class="fa fa-microchip fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/sharelinks" selected={$page.url.pathname === '/sharelinks'}>
<i class="fa fa-link fa-2xl" />
</AppRailAnchor>
</svelte:fragment>
<svelte:fragment slot="trail">
<AppRailAnchor href="/tokens" selected={$page.url.pathname === '/tokens'}>
<i class="fa fa-key fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/account" selected={$page.url.pathname === '/account'}>
<i class="fa fa-user fa-2xl" />
</AppRailAnchor>
<AppRailAnchor href="/admin" selected={$page.url.pathname === '/admin'}>
<i class="fa fa-user-shield fa-2xl" />
</AppRailAnchor>
</svelte:fragment>
</AppRail>
{/if}
5 changes: 1 addition & 4 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import { modalRegistry } from '$lib/modals';
import { page } from '$app/stores';
import { buildMetaData } from '$lib/metadata';
import { UserSelfStore } from '$lib/stores/UserStore';
storePopup.set({ computePosition, autoUpdate, flip, shift, offset, arrow });
initializeStores();
Expand All @@ -26,9 +25,7 @@

<AppShell>
<Header slot="header" />
{#if $UserSelfStore}
<Sidebar slot="sidebarLeft" />
{/if}
<Sidebar slot="sidebarLeft" />
<slot />
<Footer slot="pageFooter" />
</AppShell>

0 comments on commit 426764f

Please sign in to comment.