2018-01-26 19:53:51 +00:00
|
|
|
import { app } from 'electron';
|
|
|
|
import getWindow from './window';
|
2018-01-22 23:38:06 +00:00
|
|
|
|
|
|
|
// Quit application when all windows are closed
|
|
|
|
app.on('window-all-closed', () => {
|
|
|
|
// On macOS it is common for applications to stay open
|
|
|
|
// until the user explicitly quits
|
|
|
|
if (process.platform !== 'darwin') {
|
|
|
|
app.quit();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
app.on('activate', () => {
|
|
|
|
// On macOS it is common to re-create a window
|
|
|
|
// even after all windows have been closed
|
2018-01-26 19:53:51 +00:00
|
|
|
getWindow();
|
2018-01-22 23:38:06 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
// Create main BrowserWindow when electron is ready
|
|
|
|
app.on('ready', () => {
|
2018-01-26 19:53:51 +00:00
|
|
|
getWindow();
|
2018-01-22 23:38:06 +00:00
|
|
|
});
|