William O'Beirne df52521c17 MEW-01-009 & MEW-01-010: Electron security fixes (#910)
* Handle opening of external links in electron. Minor refactor of window code.

* Convert updates from in-app modal to electron dialogs. Remove in-app code and preload bridge.

* Refine new window blocking. Re-enable tsconfig to look at electron-app.

* Clean up shared

* Whoops, wrong protocol format
2018-01-26 13:53:51 -06:00

23 lines
545 B
TypeScript

import { app } from 'electron';
import getWindow from './window';
// 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
getWindow();
});
// Create main BrowserWindow when electron is ready
app.on('ready', () => {
getWindow();
});