diff --git a/src/electron/app-window.ts b/src/electron/app-window.ts index 84d40c4..b98fa33 100644 --- a/src/electron/app-window.ts +++ b/src/electron/app-window.ts @@ -185,8 +185,6 @@ export class AppWindow { registerWindowStateChangedEvents(this.window); - console.log(`NODE_ENV: ${process.env.NODE_ENV}`); - if (process.env.NODE_ENV === 'development') { const indexUrl = URL.format({ pathname: path.join('//localhost:4200'), diff --git a/src/electron/main.ts b/src/electron/main.ts index e439b8d..9d46f33 100644 --- a/src/electron/main.ts +++ b/src/electron/main.ts @@ -186,8 +186,8 @@ app.on('ready', () => { return; } - const dbPath = __DEV__ ? - path.join(__dirname, '..', '..', 'config', '_database.sqlite') + const dbPath = __DEV__ + ? path.join(__dirname, '..', '..', 'config', '_database.sqlite') : path.join(__dirname, '..', '..', 'bin', 'database.sqlite'); @@ -410,6 +410,8 @@ app.on('web-contents-created', (event, contents) => { }); app.on('before-quit', function (event) { + console.log(`before-quit`); + event.preventDefault(); if (null !== db) { @@ -458,6 +460,8 @@ function createWindow() { } window.onClose(() => { + console.log(`closed`); + mainWindow = null; if (!__DARWIN__ && !preventQuit) { app.quit();