diff --git a/package.json b/package.json index 7dda2c6..7b851f4 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "cz-customizable": "^5.10.0", "del": "^3.0.0", "devtron": "^1.4.0", - "electron": "4.0.2", + "electron": "^5.0.1", "electron-builder": "^20.38.4", "electron-debug": "^1.4.0", "electron-devtools-installer": "^2.2.0", diff --git a/src/main/index.js b/src/main/index.js index c027b16..85105af 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -201,6 +201,8 @@ const createWindow = () => { transparent: true, vibrancy: 'ultra-dark', webPreferences: { + nodeIntegration: true, + nodeIntegrationInWorker: true, backgroundThrottling: false } }) @@ -232,7 +234,9 @@ const createMiniWidow = () => { transparent: process.platform !== 'linux', icon: `${__static}/logo.png`, webPreferences: { - backgroundThrottling: false + backgroundThrottling: false, + nodeIntegration: true, + nodeIntegrationInWorker: true } } @@ -265,6 +269,8 @@ const createSettingWindow = () => { titleBarStyle: 'hidden', webPreferences: { backgroundThrottling: false, + nodeIntegration: true, + nodeIntegrationInWorker: true, webSecurity: false } } diff --git a/src/main/utils/uploader.js b/src/main/utils/uploader.js index 9a8da57..d90e195 100644 --- a/src/main/utils/uploader.js +++ b/src/main/utils/uploader.js @@ -23,6 +23,8 @@ const createRenameWindow = (win) => { resizable: false, vibrancy: 'ultra-dark', webPreferences: { + nodeIntegration: true, + nodeIntegrationInWorker: true, backgroundThrottling: false } } diff --git a/yarn.lock b/yarn.lock index 7d896ca..fa7cb63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3750,9 +3750,10 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47: version "1.3.115" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.115.tgz#fdaa56c19b9f7386dbf29abc1cc632ff5468ff3b" -electron@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/electron/-/electron-4.0.2.tgz#b5e074c149841490825d0785aa2bc4f5e29bbea4" +electron@^5.0.1: + version "5.0.1" + resolved "https://registry.npm.taobao.org/electron/download/electron-5.0.1.tgz#6bd7bf4d25e9bfce4cccd629d587fba5281f95cc" + integrity sha1-a9e/TSXpv85MzNYp1Yf7pSgflcw= dependencies: "@types/node" "^10.12.18" electron-download "^4.1.0"