-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
30 lines (22 loc) · 750 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
const { app, BrowserWindow, nativeTheme } = require("electron");
require('@electron/remote/main').initialize();
function createWindow () {
const mainWindow = new BrowserWindow({
width: 900,
height: 500,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.setMenuBarVisibility(false);
mainWindow.loadFile("window/index.html");
//mainWindow.setIcon(__dirname + "/icons/icon.png");
nativeTheme.themeSource = "light";
require('@electron/remote/main').enable(mainWindow.webContents)
}
app.whenReady().then(() => {
createWindow();
});
app.on("window-all-closed", function () { app.quit(); });