diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 3d00e8f7..6425b915 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -26,6 +26,9 @@ const appState = AppStateService.instance; const api = API.instance; + // debug / dev + const isDevelopement = import.meta.env.DEV; + // local state let loginStatus = AppStateService.LOGIN.UNKNOWN; let installState = AppStateService.INSTALL.UNKNOWN; @@ -155,7 +158,11 @@ console.log(s.loginStatus); console.log('layout: navigating to /dashboard/'); // tick fixes weird bug where goto does not work inside this subscribe - tick().then(() => goto('/dashboard/')); + if (isDevelopement) { + console.log('dev: Skipping navigation'); + } else { + tick().then(() => goto('/dashboard/')); + } return; } }); diff --git a/frontend/src/routes/install/+page.svelte b/frontend/src/routes/install/+page.svelte index 2eba06b0..14b9f56e 100644 --- a/frontend/src/routes/install/+page.svelte +++ b/frontend/src/routes/install/+page.svelte @@ -47,7 +47,8 @@ let installTemplates = false; let templatesError = ''; - // Removed edition detection - single unified installation + // dev + const isDevelopement = import.meta.env.DEV; // initialize theme system onMount(() => { @@ -60,7 +61,11 @@ const isInstalled = appStateService.isInstalled(); if (isInstalled || user.role !== 'superadministrator') { console.info('install - navigating to dashboard'); - goto('/dashboard/'); + if (isDevelopement) { + console.info('Skipping navigation due to development mode'); + } else { + goto('/dashboard/'); + } } const nextStep = () => {