fix: hide sidebar on login page
This commit is contained in:
@@ -33,6 +33,9 @@
|
|||||||
let sseConnection: SSEConnection | null = null;
|
let sseConnection: SSEConnection | null = null;
|
||||||
let sidebarOpen = $state(false);
|
let sidebarOpen = $state(false);
|
||||||
|
|
||||||
|
// Hide sidebar and chrome on the login page.
|
||||||
|
const isLoginPage = $derived($page.url.pathname === '/login');
|
||||||
|
|
||||||
// Apply theme reactively.
|
// Apply theme reactively.
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
applyTheme($resolvedTheme);
|
applyTheme($resolvedTheme);
|
||||||
@@ -70,6 +73,10 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#if isLoginPage}
|
||||||
|
<!-- Login page: no sidebar, no chrome -->
|
||||||
|
{@render children()}
|
||||||
|
{:else}
|
||||||
<div class="flex h-screen overflow-hidden bg-[var(--surface-page)]">
|
<div class="flex h-screen overflow-hidden bg-[var(--surface-page)]">
|
||||||
<!-- Mobile overlay -->
|
<!-- Mobile overlay -->
|
||||||
{#if sidebarOpen}
|
{#if sidebarOpen}
|
||||||
@@ -169,5 +176,6 @@
|
|||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<Toast />
|
<Toast />
|
||||||
|
|||||||
Reference in New Issue
Block a user