-
Notifications
You must be signed in to change notification settings - Fork 135
/
app.js
32 lines (30 loc) · 831 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const {app, BrowserWindow} = require('electron');
let mainWindow;
function createWindow () {
// Create the browser window.
mainWindow = new BrowserWindow({
width: 1280,
height: 768,
minWidth: 990,
minHeight: 480,
transparent: true,
frame: false,
webPreferences: {
nodeIntegration: true
}
});
mainWindow.loadFile('desktop-app/index.html');
//mainWindow.webContents.openDevTools();
mainWindow.on('closed', function () {
mainWindow = null
});
mainWindow.setMenu(null);
}
app.on('ready', createWindow);
// Quit when all windows are closed.
app.on('window-all-closed', function () {
if (process.platform !== 'darwin') app.quit()
});
app.on('activate', function () {
if (mainWindow === null) createWindow()
});