ing
This commit is contained in:
parent
df1c926c67
commit
5a0f024519
|
@ -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'),
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user