From 629c66cc34b8af7c4add023b5b23e843077f6aa6 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Mon, 23 Mar 2026 22:17:32 +0100 Subject: [PATCH] Fix layout rendering for /auth/change-password page The change-password page was showing both the main layout sidebar and its own header. Now only auth-only routes (login, forgot) skip the main layout. --- frontend/src/routes/+layout.svelte | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 28b86fa..ee04475 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -31,10 +31,13 @@ $effect(() => { const path = $page.url.pathname; - if (!path.startsWith('/auth/')) { - checkAuth(); - } else { + // Auth-only routes (login, forgot) - no auth required, no layout chrome + // /auth/change-password requires auth, so treat it like a regular route + const isAuthOnlyRoute = path === '/auth/login' || path === '/auth/forgot'; + if (isAuthOnlyRoute) { loading = false; + } else { + checkAuth(); } });