-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathmain.js
More file actions
21 lines (19 loc) · 774 Bytes
/
Copy pathmain.js
File metadata and controls
21 lines (19 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const { app, BrowserWindow } = require('electron');
const path = require('path');
const { registerHandlers } = require('./src/main/ipcHandlers');
function createWindow () {
const win = new BrowserWindow({
width: 1280, height: 800,
icon: path.join(__dirname, 'assets/AppIcon.png'),
minWidth: 1000, minHeight: 700, frame: false, backgroundColor: '#202225',
webPreferences: { nodeIntegration: true, contextIsolation: false }
});
win.setMenuBarVisibility(false);
win.loadFile('index.html');
registerHandlers(win);
}
app.whenReady().then(() => {
createWindow();
app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) createWindow(); });
});
app.on('window-all-closed', () => { if (process.platform !== 'darwin') app.quit(); });