123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- const { app, BrowserWindow } = require('electron')
- const config = require('./lib/config.js')
- let mainWindow
- function createWindow() {
-
-
- mainWindow = new BrowserWindow({
- width: 1100,
- height: 720,
- resizable: false,
- webPreferences: {
- nodeIntegration: true,
- nodeIntegrationInWorker: true
- }
- })
-
- mainWindow.loadFile('view/login.html')
-
- if (config.openDevTools === true) {
- mainWindow.webContents.openDevTools()
- }
-
- mainWindow.on('closed', function () {
-
-
-
- mainWindow = null
- })
- }
- app.on('ready', createWindow)
- app.on('window-all-closed', function () {
-
-
-
- app.quit()
-
- })
- app.on('activate', function () {
-
-
- if (mainWindow === null) {
- createWindow()
- }
- })
|