From 5a0f02451995edf0f09b18f5bfc8a25fe469cdde Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 2 Oct 2018 21:42:02 +0900 Subject: [PATCH] ing --- src/electron/app-window.ts | 2 -- src/electron/main.ts | 8 ++++++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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();