-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
35 lines (30 loc) · 827 Bytes
/
main.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
33
34
35
const { app, BrowserWindow } = require('electron')
const controls = require('./hardware.js');
const network = require('./network.js');
const config = require('./config.json');
function createWindow () {
// Create the browser window.
let win = new BrowserWindow({
width: 1920,
height: 1080,
webPreferences: {
nodeIntegration: true
},
fullscreen: true,
autoHideMenuBar: true
})
switch(config.station.trim()){
case("helm"):{
win.loadFile('www/helm.html');
break;
}
default:{
// and load the index.html of the app.
win.loadFile('www/index.html');
break;
}
}
// Open the DevTools.
win.webContents.openDevTools()
}
app.on('ready', createWindow)