-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
34 lines (28 loc) · 781 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
const { app, BrowserWindow, ipcMain,Notification } = require('electron');
let mainWindow;
app.disableHardwareAcceleration();
app.on('ready', () => {
mainWindow = new BrowserWindow({
// width: 1920,
// height: 1080,
width: 300,
height: 160,
frame: false,
alwaysOnTop: true,
resizable: false,
autoHideMenuBar: true,
transparent: true,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
devTools: true
}
});
mainWindow.loadFile('index.html');
// Open the DevTools.
//mainWindow.webContents.openDevTools()
// Manipulador para encerrar a aplicação
ipcMain.on('close-app', () => {
app.quit();
});
});