diff options
Diffstat (limited to 'src')
-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 |
4 files changed, 17 insertions, 16 deletions
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 | ||