feat(core): upgrade to electron 16

This commit is contained in:
Alexey Kasyanchuk
2022-01-02 02:29:09 +03:00
parent e598048389
commit 30a6901077
8 changed files with 7099 additions and 6813 deletions

View File

@ -147,6 +147,8 @@ autoUpdater.on('update-downloaded', () => {
let tray = undefined
require('@electron/remote/main').initialize();
app.on("ready", async () => {
let rootPath;
({ sphinx, rootPath } = await startSphinx(() => {
@ -224,6 +226,8 @@ app.on("ready", async () => {
tray.setContextMenu(contextMenu)
tray.setToolTip('Rats on The Boat search')
require("@electron/remote/main").enable(mainWindow.webContents);
mainWindow.webContents.on('will-navigate', (e, url) => {
e.preventDefault()
shell.openExternal(url)

View File

@ -25,6 +25,7 @@ export const aboutMenuTemplateFunc = () => ({
protocol: "file:",
slashes: true
}))
require("@electron/remote/main").enable(win.webContents);
win.webContents.on('did-finish-load', () => {
logT('changelog', "finish load page, open changlog")
setTimeout(() => win.send('url', '/changelog'), 0)