mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
create separate window for setup and then main window
This commit is contained in:
@@ -2,10 +2,18 @@
|
||||
|
||||
const sqlInit = require('../services/sql_init');
|
||||
const setupService = require('../services/setup');
|
||||
const utils = require('../services/utils');
|
||||
const windowService = require('../services/window');
|
||||
|
||||
async function setupPage(req, res) {
|
||||
if (await sqlInit.isDbInitialized()) {
|
||||
res.redirect('/');
|
||||
if (utils.isElectron()) {
|
||||
await windowService.createMainWindow();
|
||||
windowService.closeSetupWindow();
|
||||
}
|
||||
else {
|
||||
res.redirect('/');
|
||||
}
|
||||
}
|
||||
|
||||
// we got here because DB is not completely initialized so if schema exists
|
||||
|
||||
Reference in New Issue
Block a user