diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | package-lock.json | 30 | ||||
-rw-r--r-- | package.json | 4 | ||||
-rw-r--r-- | src/components/auth/AuthLayout.js | 2 | ||||
-rw-r--r-- | src/components/layout/AppLayout.js | 2 | ||||
-rw-r--r-- | src/components/services/content/ServiceWebview.js | 3 | ||||
-rw-r--r-- | src/index.js | 26 |
7 files changed, 29 insertions, 40 deletions
@@ -227,7 +227,7 @@ If you use an AUR Helper, e.g. yay, install it via `yay -S ferdi`. | |||
227 | 227 | ||
228 | ### Adds internal changes | 228 | ### Adds internal changes |
229 | 229 | ||
230 | - [x] Upgrades to Electron 13.5.1 | 230 | - [x] Upgrades to Electron 14.1.0 |
231 | - [x] Switches to [`electron-spellchecker`](https://github.com/electron-userland/electron-spellchecker) to improve application size | 231 | - [x] Switches to [`electron-spellchecker`](https://github.com/electron-userland/electron-spellchecker) to improve application size |
232 | - [x] Minifies build files to improve app size | 232 | - [x] Minifies build files to improve app size |
233 | - [x] Adds "npm run prepare-code" command for development to lint and beautify code | 233 | - [x] Adds "npm run prepare-code" command for development to lint and beautify code |
diff --git a/package-lock.json b/package-lock.json index fe60108d8..a4bc73cec 100644 --- a/package-lock.json +++ b/package-lock.json | |||
@@ -13066,9 +13066,9 @@ | |||
13066 | } | 13066 | } |
13067 | }, | 13067 | }, |
13068 | "electron": { | 13068 | "electron": { |
13069 | "version": "13.5.1", | 13069 | "version": "14.1.0", |
13070 | "resolved": "https://registry.npmjs.org/electron/-/electron-13.5.1.tgz", | 13070 | "resolved": "https://registry.npmjs.org/electron/-/electron-14.1.0.tgz", |
13071 | "integrity": "sha512-ZyxhIhmdaeE3xiIGObf0zqEyCyuIDqZQBv9NKX8w5FNzGm87j4qR0H1+GQg6vz+cA1Nnv1x175Zvimzc0/UwEQ==", | 13071 | "integrity": "sha512-MnZSITjtdrY6jM/z/qXcuJqbIvz7MbxHp9f1O93mq/vt7aTxHYgjerPSqwya/RoUjkPEm1gkz669FsRk6ZtMdQ==", |
13072 | "dev": true, | 13072 | "dev": true, |
13073 | "requires": { | 13073 | "requires": { |
13074 | "@electron/get": "^1.0.1", | 13074 | "@electron/get": "^1.0.1", |
@@ -13430,13 +13430,13 @@ | |||
13430 | } | 13430 | } |
13431 | }, | 13431 | }, |
13432 | "electron-react-titlebar": { | 13432 | "electron-react-titlebar": { |
13433 | "version": "0.8.2", | 13433 | "version": "1.0.0", |
13434 | "resolved": "https://registry.npmjs.org/electron-react-titlebar/-/electron-react-titlebar-0.8.2.tgz", | 13434 | "resolved": "https://registry.npmjs.org/electron-react-titlebar/-/electron-react-titlebar-1.0.0.tgz", |
13435 | "integrity": "sha512-Bbkaryi6JmtSuq8hAM+RNxlPhmQdE/7bdEsBasTtS+tbHHPsX0p4ilxVxKlFt23geV8kQaSq7qoZr30ixW8jtw==", | 13435 | "integrity": "sha512-/Ilv4kYPyJ1czijKtkQ1pXgvI/UeWaHjlNRnvuimWbrDzJJhsEtRHMdbnR1MaZEqRlT5pPlCIy3VflTP6ow3rg==", |
13436 | "requires": { | 13436 | "requires": { |
13437 | "classnames": "^2.2.6", | 13437 | "classnames": "^2.3.1", |
13438 | "lodash": "^4.17.15", | 13438 | "lodash": "^4.17.21", |
13439 | "react-virtualized": "^9.7.6" | 13439 | "react-virtualized": "^9.22.3" |
13440 | } | 13440 | } |
13441 | }, | 13441 | }, |
13442 | "electron-to-chromium": { | 13442 | "electron-to-chromium": { |
@@ -25673,18 +25673,6 @@ | |||
25673 | "loose-envify": "^1.4.0", | 25673 | "loose-envify": "^1.4.0", |
25674 | "prop-types": "^15.7.2", | 25674 | "prop-types": "^15.7.2", |
25675 | "react-lifecycles-compat": "^3.0.4" | 25675 | "react-lifecycles-compat": "^3.0.4" |
25676 | }, | ||
25677 | "dependencies": { | ||
25678 | "prop-types": { | ||
25679 | "version": "15.7.2", | ||
25680 | "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", | ||
25681 | "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", | ||
25682 | "requires": { | ||
25683 | "loose-envify": "^1.4.0", | ||
25684 | "object-assign": "^4.1.1", | ||
25685 | "react-is": "^16.8.1" | ||
25686 | } | ||
25687 | } | ||
25688 | } | 25676 | } |
25689 | }, | 25677 | }, |
25690 | "reactive-localstorage": { | 25678 | "reactive-localstorage": { |
diff --git a/package.json b/package.json index 7e817acce..97edff9d2 100644 --- a/package.json +++ b/package.json | |||
@@ -83,7 +83,7 @@ | |||
83 | "electron-dl": "3.2.1", | 83 | "electron-dl": "3.2.1", |
84 | "electron-fetch": "1.7.4", | 84 | "electron-fetch": "1.7.4", |
85 | "electron-find": "1.0.7", | 85 | "electron-find": "1.0.7", |
86 | "electron-react-titlebar": "0.8.2", | 86 | "electron-react-titlebar": "1.0.0", |
87 | "electron-updater": "4.3.9", | 87 | "electron-updater": "4.3.9", |
88 | "electron-window-state": "5.0.3", | 88 | "electron-window-state": "5.0.3", |
89 | "fs-extra": "10.0.0", | 89 | "fs-extra": "10.0.0", |
@@ -171,7 +171,7 @@ | |||
171 | "cross-env": "7.0.3", | 171 | "cross-env": "7.0.3", |
172 | "cz-conventional-changelog": "3.3.0", | 172 | "cz-conventional-changelog": "3.3.0", |
173 | "dotenv": "10.0.0", | 173 | "dotenv": "10.0.0", |
174 | "electron": "13.5.1", | 174 | "electron": "14.1.0", |
175 | "electron-builder": "22.12.1", | 175 | "electron-builder": "22.12.1", |
176 | "electron-notarize": "1.1.0", | 176 | "electron-notarize": "1.1.0", |
177 | "eslint": "7.32.0", | 177 | "eslint": "7.32.0", |
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js index 3e2b75731..17ac221a2 100644 --- a/src/components/auth/AuthLayout.js +++ b/src/components/auth/AuthLayout.js | |||
@@ -1,7 +1,7 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
4 | import { TitleBar } from 'electron-react-titlebar'; | 4 | import { TitleBar } from 'electron-react-titlebar/renderer'; |
5 | 5 | ||
6 | import { injectIntl } from 'react-intl'; | 6 | import { injectIntl } from 'react-intl'; |
7 | import Link from '../ui/Link'; | 7 | import Link from '../ui/Link'; |
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 9f8e217b9..0a65dcffa 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'; | |||
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; | 3 | import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; |
4 | import { defineMessages, injectIntl } from 'react-intl'; | 4 | import { defineMessages, injectIntl } from 'react-intl'; |
5 | import { TitleBar } from 'electron-react-titlebar'; | 5 | import { TitleBar } from 'electron-react-titlebar/renderer'; |
6 | import injectSheet from 'react-jss'; | 6 | import injectSheet from 'react-jss'; |
7 | 7 | ||
8 | import InfoBar from '../ui/InfoBar'; | 8 | import InfoBar from '../ui/InfoBar'; |
diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index c0f48793a..d3170be53 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js | |||
@@ -85,7 +85,8 @@ class ServiceWebview extends Component { | |||
85 | useragent={service.userAgent} | 85 | useragent={service.userAgent} |
86 | disablewebsecurity={service.recipe.disablewebsecurity ? true : undefined} | 86 | disablewebsecurity={service.recipe.disablewebsecurity ? true : undefined} |
87 | allowpopups | 87 | allowpopups |
88 | webpreferences={`spellcheck=${isSpellcheckerEnabled ? 1 : 0}`} | 88 | nodeintegration |
89 | webpreferences={`spellcheck=${isSpellcheckerEnabled ? 1 : 0}, contextIsolation=1, enableRemoteModule=1`} | ||
89 | /> | 90 | /> |
90 | ); | 91 | ); |
91 | } | 92 | } |
diff --git a/src/index.js b/src/index.js index d947d96ca..9f384f5fa 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -43,11 +43,6 @@ import userAgent from './helpers/userAgent-helpers'; | |||
43 | 43 | ||
44 | const debug = require('debug')('Ferdi:App'); | 44 | const debug = require('debug')('Ferdi:App'); |
45 | 45 | ||
46 | // From Electron 9 onwards, app.allowRendererProcessReuse = true by default. This causes the app to crash on Windows due to the | ||
47 | // Electron Windows Notification API crashing. Setting this to false fixes the issue until the electron team fixes the notification bug | ||
48 | // More Info - https://github.com/electron/electron/issues/18397 | ||
49 | app.allowRendererProcessReuse = false; | ||
50 | |||
51 | // Globally set useragent to fix user agent override in service workers | 46 | // Globally set useragent to fix user agent override in service workers |
52 | debug('Set userAgent to ', userAgent()); | 47 | debug('Set userAgent to ', userAgent()); |
53 | app.userAgentFallback = userAgent(); | 48 | app.userAgentFallback = userAgent(); |
@@ -411,31 +406,36 @@ app.on('ready', () => { | |||
411 | } | 406 | } |
412 | 407 | ||
413 | if (isWindows) { | 408 | if (isWindows) { |
414 | app.setUserTasks([ | 409 | const extraArgs = isDevMode ? `${__dirname} ` : ''; |
415 | { | 410 | const iconPath = asarPath( |
416 | program: process.execPath, | ||
417 | arguments: `${isDevMode ? `${__dirname} ` : ''}--reset-window`, | ||
418 | iconPath: asarPath( | ||
419 | join( | 411 | join( |
420 | isDevMode ? `${__dirname}../src/` : __dirname, | 412 | isDevMode ? `${__dirname}../src/` : __dirname, |
421 | 'assets/images/taskbar/win32/display.ico', | 413 | 'assets/images/taskbar/win32/display.ico', |
422 | ), | 414 | ), |
423 | ), | 415 | ); |
416 | app.setUserTasks([ | ||
417 | { | ||
418 | program: process.execPath, | ||
419 | arguments: `${extraArgs}--reset-window`, | ||
420 | iconPath, | ||
424 | iconIndex: 0, | 421 | iconIndex: 0, |
425 | title: 'Move Ferdi to Current Display', | 422 | title: 'Move Ferdi to Current Display', |
426 | description: 'Restore the position and size of Ferdi', | 423 | description: 'Restore the position and size of Ferdi', |
427 | }, | 424 | }, |
428 | { | 425 | { |
429 | program: process.execPath, | 426 | program: process.execPath, |
430 | arguments: `${isDevMode ? `${__dirname} ` : ''}--quit`, | 427 | arguments: `${extraArgs}--quit`, |
428 | iconPath, | ||
431 | iconIndex: 0, | 429 | iconIndex: 0, |
432 | iconPath: null, | ||
433 | title: 'Quit Ferdi', | 430 | title: 'Quit Ferdi', |
434 | description: null, | 431 | description: null, |
435 | }, | 432 | }, |
436 | ]); | 433 | ]); |
437 | } | 434 | } |
438 | 435 | ||
436 | // eslint-disable-next-line global-require | ||
437 | require('electron-react-titlebar/main').initialize(); | ||
438 | |||
439 | createWindow(); | 439 | createWindow(); |
440 | }); | 440 | }); |
441 | 441 | ||