create separate window for setup and then main window

This commit is contained in:
zadam
2019-12-24 14:42:03 +01:00
parent 229974e543
commit a155b6e8d5
5 changed files with 112 additions and 85 deletions

View File

@@ -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