mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-10-12 10:07:14 +02:00
add dev support for showing install page
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
1 parent
83f5c0ca14
commit
d23c1a7b47
2 files changed
+15
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
Reference in new issue
Block a user