add dev support for showing install page

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing committed 2025-12-03 19:11:19 +01:00
1 parent 83f5c0ca14
commit d23c1a7b47
2 files changed
+15 -3

No files matched your search

+8 -1
View File
@@ -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;
}
});
+7 -2
View File
@@ -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 = () => {