chore: update electron
Also includes fix from https://github.com/electron/electron/issues/13008#issuecomment-400261941
This commit is contained in:
parent
e8aa67bf7e
commit
5e8d8e8710
3 changed files with 14 additions and 5 deletions
|
@ -98,7 +98,7 @@
|
|||
"decompress": "^4.2.0",
|
||||
"del": "^3.0.0",
|
||||
"devtron": "^1.4.0",
|
||||
"electron": "^1.8.4",
|
||||
"electron": "^2.0.6",
|
||||
"electron-builder": "^20.22.0",
|
||||
"electron-devtools-installer": "^2.2.3",
|
||||
"electron-webpack": "^1.13.0",
|
||||
|
|
|
@ -5,7 +5,7 @@ import SemVer from 'semver';
|
|||
import findProcess from 'find-process';
|
||||
import url from 'url';
|
||||
import https from 'https';
|
||||
import { shell, app, ipcMain, dialog } from 'electron';
|
||||
import { shell, app, ipcMain, dialog, session } from 'electron';
|
||||
import { autoUpdater } from 'electron-updater';
|
||||
import isDev from 'electron-is-dev';
|
||||
import Daemon from './Daemon';
|
||||
|
@ -89,6 +89,15 @@ app.on('ready', async () => {
|
|||
rendererWindow.webContents.send('devtools-is-opened');
|
||||
});
|
||||
tray = createTray(rendererWindow);
|
||||
// HACK: patch webrequest to fix devtools incompatibility with electron 2.x.
|
||||
// See https://github.com/electron/electron/issues/13008#issuecomment-400261941
|
||||
session.defaultSession.webRequest.onBeforeRequest({}, (details, callback) => {
|
||||
if (details.url.indexOf('7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33') !== -1) {
|
||||
callback({redirectURL: details.url.replace('7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33', '57c9d07b416b5a2ea23d28247300e4af36329bdc')});
|
||||
} else {
|
||||
callback({cancel: false});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
|
|
|
@ -3173,9 +3173,9 @@ electron-window-state@^4.1.1:
|
|||
jsonfile "^2.2.3"
|
||||
mkdirp "^0.5.1"
|
||||
|
||||
electron@^1.8.4:
|
||||
version "1.8.7"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-1.8.7.tgz#373c1dc4589d7ab4acd49aff8db4a1c0a6c3bcc1"
|
||||
electron@^2.0.5:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.6.tgz#8e5c1bd2ebc08fa7a6ee906de3753c1ece9d7300"
|
||||
dependencies:
|
||||
"@types/node" "^8.0.24"
|
||||
electron-download "^3.0.1"
|
||||
|
|
Loading…
Reference in a new issue