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