-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-process.js
More file actions
42 lines (36 loc) · 962 Bytes
/
app-process.js
File metadata and controls
42 lines (36 loc) · 962 Bytes
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
36
37
38
39
40
41
42
const { BrowserWindow, Menu } = require("electron");
const createAppWindow = () => {
let win = new BrowserWindow({
width: 800,
height: 600,
minWidth: 800,
minHeight: 600,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
},
});
require("@electron/remote/main").enable(win.webContents)
// const menuTemplate = [{
// label: 'file',
// submenu: [
// { role: 'quit' },
// { role: 'close' }
// ]
// },
// {
// label: 'tools',
// submenu: [
// { role: 'toggleDevTools' }
// ]
// },
// ];
// const menu = Menu.buildFromTemplate(menuTemplate);
// Menu.setApplicationMenu(menu);
win.loadFile("./renderers/home.html");
win.on("closed", () => {
win = null;
});
};
module.exports = createAppWindow;