Add files via upload
This commit is contained in:
12 files changed
+4682
No files matched your search
@@ -0,0 +1,28 @@
|
||||
const { app, BrowserWindow, powerSaveBlocker } = require('electron');
|
||||
const path = require('path');
|
||||
|
||||
function createWindow() {
|
||||
// Keep system and display from sleeping while the app is running
|
||||
powerSaveBlocker.start('prevent-app-suspension');
|
||||
powerSaveBlocker.start('prevent-display-sleep');
|
||||
const win = new BrowserWindow({
|
||||
width: 320,
|
||||
height: 420,
|
||||
minWidth: 280,
|
||||
minHeight: 320,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
contextIsolation: true,
|
||||
nodeIntegration: false,
|
||||
webviewTag: true,
|
||||
},
|
||||
title: 'PTW Auto-Disconnect',
|
||||
show: false,
|
||||
});
|
||||
|
||||
win.once('ready-to-show', () => win.show());
|
||||
win.loadFile('index.html');
|
||||
}
|
||||
|
||||
app.whenReady().then(createWindow);
|
||||
app.on('window-all-closed', () => app.quit());
|
||||
Reference in new issue
Block a user