mirror of
https://github.com/danbulant/ester-klient
synced 2026-06-14 03:51:28 +00:00
38 lines
No EOL
680 B
JavaScript
38 lines
No EOL
680 B
JavaScript
const { app, BrowserWindow } = require('electron')
|
|
|
|
var win;
|
|
|
|
function createWindow() {
|
|
win = new BrowserWindow({
|
|
width: 800,
|
|
height: 600,
|
|
webPreferences: {
|
|
nodeIntegration: true
|
|
}
|
|
})
|
|
|
|
if(process.env.NODE_ENV == "dev"){
|
|
win.loadFile('view/index.html')
|
|
}
|
|
win.removeMenu();
|
|
win.setMenu(null);
|
|
win.webContents.openDevTools()
|
|
|
|
win.on('closed', () => {
|
|
win = null
|
|
})
|
|
}
|
|
|
|
app.on('ready', createWindow)
|
|
|
|
app.on('window-all-closed', () => {
|
|
if (process.platform !== 'darwin') {
|
|
app.quit()
|
|
}
|
|
})
|
|
|
|
app.on('activate', () => {
|
|
if (win === null) {
|
|
createWindow()
|
|
}
|
|
}) |