2020-12-05 21:08:32 +01:00
|
|
|
const { app, BrowserWindow, Menu } = require('electron')
|
2020-12-07 23:57:48 +01:00
|
|
|
const path = require('path');
|
|
|
|
const iconPath = path.join(__dirname, "icon.png");
|
2020-12-05 21:08:32 +01:00
|
|
|
|
|
|
|
function createWindow () {
|
|
|
|
const win = new BrowserWindow({
|
2020-12-07 23:57:48 +01:00
|
|
|
width: 1000,
|
2020-12-05 21:08:32 +01:00
|
|
|
height: 600,
|
2020-12-07 23:57:48 +01:00
|
|
|
icon: iconPath,
|
2020-12-05 21:08:32 +01:00
|
|
|
webPreferences: {
|
|
|
|
nodeIntegration: true,
|
|
|
|
enableRemoteModule: true
|
|
|
|
},
|
|
|
|
frame: false
|
|
|
|
})
|
2020-12-07 23:57:48 +01:00
|
|
|
//Menu.setApplicationMenu(null)
|
2020-12-05 21:08:32 +01:00
|
|
|
win.loadFile('index.html')
|
|
|
|
}
|
|
|
|
|
|
|
|
app.whenReady().then(() => {
|
|
|
|
createWindow()
|
|
|
|
})
|
|
|
|
|
|
|
|
app.on('window-all-closed', () => {
|
|
|
|
if (process.platform !== 'darwin') {
|
|
|
|
app.quit()
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
app.on('activate', () => {
|
|
|
|
if (win === null){
|
|
|
|
createWindow()
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|