-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
30 lines (24 loc) · 831 Bytes
/
index.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
const { app, BrowserWindow, Menu, screen } = require('electron');
const path = require('path');
require('electron-reload')(__dirname);
const createWindow = () => {
const { width, height } = screen.getPrimaryDisplay().workAreaSize;
// Menu.setApplicationMenu(false);
require('@treverix/remote/main').initialize()
window = new BrowserWindow({
// width: width / 2,
// height: height / 1.25,
width: 320,
height: 300,
frame: process.platform === 'darwin',
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
preload: path.join(__dirname, 'preload.js')
}
});
window.loadFile('public/index.html');
};
let window = null;
app.whenReady().then(createWindow)
app.on('window-all-closed', () => app.quit());