| 1234567891011121314151617181920212223242526272829303132 |
- const { app, BrowserWindow } = require('electron');
- let mainWindow;
- function createWindow () {
- mainWindow = new BrowserWindow({ width: 1280, height: 720, show: false });
- mainWindow.once('ready-to-show', function(){
- mainWindow.maximize();
- mainWindow.show();
- });
- mainWindow.loadURL('http://127.0.0.1:1841/');
- mainWindow.webContents.openDevTools();
- mainWindow.on('closed', function () {
- mainWindow = null;
- });
- }
- app.on('ready', createWindow);
- // Quit when all windows are closed, except for Mac users
- app.on('window-all-closed', function () {
- if (process.platform !== 'darwin') {
- app.quit()
- }
- });
- app.on('activate', function () {
- if (mainWindow === null) {
- createWindow();
- }
- });
|