mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-04 18:39:54 +00:00
electron-remote fixes
This commit is contained in:
parent
8a8e7cd99f
commit
8587cd31dd
@ -3,7 +3,6 @@ import * as glasstron from 'glasstron'
|
|||||||
import { Subject, Observable, debounceTime } from 'rxjs'
|
import { Subject, Observable, debounceTime } from 'rxjs'
|
||||||
import { BrowserWindow, app, ipcMain, Rectangle, Menu, screen, BrowserWindowConstructorOptions, TouchBar, nativeImage } from 'electron'
|
import { BrowserWindow, app, ipcMain, Rectangle, Menu, screen, BrowserWindowConstructorOptions, TouchBar, nativeImage } from 'electron'
|
||||||
import ElectronConfig = require('electron-config')
|
import ElectronConfig = require('electron-config')
|
||||||
import { enable as enableRemote } from '@electron/remote/main'
|
|
||||||
import * as os from 'os'
|
import * as os from 'os'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import macOSRelease from 'macos-release'
|
import macOSRelease from 'macos-release'
|
||||||
@ -70,6 +69,7 @@ export class Window {
|
|||||||
preload: path.join(__dirname, 'sentry.js'),
|
preload: path.join(__dirname, 'sentry.js'),
|
||||||
backgroundThrottling: false,
|
backgroundThrottling: false,
|
||||||
contextIsolation: false,
|
contextIsolation: false,
|
||||||
|
enableRemoteModule: true,
|
||||||
},
|
},
|
||||||
maximizable: true,
|
maximizable: true,
|
||||||
frame: false,
|
frame: false,
|
||||||
@ -129,8 +129,6 @@ export class Window {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
enableRemote(this.window.webContents)
|
|
||||||
|
|
||||||
this.window.loadURL(`file://${app.getAppPath()}/dist/index.html`, { extraHeaders: 'pragma: no-cache\n' })
|
this.window.loadURL(`file://${app.getAppPath()}/dist/index.html`, { extraHeaders: 'pragma: no-cache\n' })
|
||||||
|
|
||||||
this.window.webContents.setVisualZoomLevelLimits(1, 1)
|
this.window.webContents.setVisualZoomLevelLimits(1, 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user