electron 14

This commit is contained in:
Eugene Pankov
2021-12-12 14:05:55 +01:00
parent 9500fa8770
commit b6fd909d67
5 changed files with 19 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ import * as glasstron from 'glasstron'
import { Subject, Observable, debounceTime } from 'rxjs'
import { BrowserWindow, app, ipcMain, Rectangle, Menu, screen, BrowserWindowConstructorOptions, TouchBar, nativeImage } from 'electron'
import ElectronConfig = require('electron-config')
import { enable as enableRemote } from '@electron/remote/main'
import * as os from 'os'
import * as path from 'path'
import macOSRelease from 'macos-release'
@@ -65,7 +66,6 @@ export class Window {
nodeIntegration: true,
preload: path.join(__dirname, 'sentry.js'),
backgroundThrottling: false,
enableRemoteModule: true,
contextIsolation: false,
},
maximizable: true,
@@ -126,6 +126,8 @@ export class Window {
}
})
enableRemote(this.window.webContents)
this.window.loadURL(`file://${app.getAppPath()}/dist/index.html`, { extraHeaders: 'pragma: no-cache\n' })
this.window.webContents.setVisualZoomLevelLimits(1, 1)