app.on('activate', function() { if (mainWindow === null) { createWindow(); } });
// Install `vue-devtools` require('electron').app.on('ready', () => { let installExtension = require('electron-devtools-installer') installExtension.default(installExtension.VUEJS_DEVTOOLS) .then(() => {}) .catch(err => { console.log('Unable to install `vue-devtools`: \n', err) }) })
app.on('browser-window-focus', (event, window) => { window.$focus = true; dockNotificationCache[window.id] = 0; if (process.platform === 'darwin' || (process.platform === 'linux' && app.isUnityRunning && app.isUnityRunning())) { app.setBadgeCount(0); } });
app.on('window-all-closed', () => { db.set("auto_page", "0"); db.set("is_mouse", "0"); if (isMac) { db.set("curr_model", "1") } if (process.platform !== 'darwin') { app.quit() } })
app.on('window-all-closed', () => { promptOnClose = false; if (process.platform !== 'darwin') { app.quit(); } });
app.on('activate', () => { // On OS X it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. if (mainWindow !== null) mainWindow.show(); if (win === null && mainWindow === null) { createWindow(); } });
app.on('activate', (event, hasVisibleWindows) => { if(!hasVisibleWindows && appReady) { onReady(); } });
/* ======================= APP EVENTS ======================= */ app.on('ready', () => { createWindow(); setupListeners(); createMenu(); });
// Quit when all windows are closed. app.on("window-all-closed", () => { app.quit(); });
app.on('activate', function() { if (mainWindow === null) { createWindow(); } });
// Quit when all windows are closed. app.on('window-all-closed', () => { // On OS X it is common for applications and their menu bar // to stay active until the user quits explicitly with Cmd + Q if (process.platform !== 'darwin') { app.quit(); } });
app.on("activate", () => { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. if (win === null) { createWindow(); } });
app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } });
app.on('window-all-closed', () => { if (process.platform !== 'darwin') { app.quit(); } });
app.on('ready', (label) => { appReady = true; onReady(label !== 'new-window' ? processParamHandler : null); });