aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-10-04 23:22:35 +0530
committerLibravatar GitHub <noreply@github.com>2021-10-04 23:22:35 +0530
commite59ef69833aad04b37d77b4428de738fdf098568 (patch)
treeaa6cc0894701e44d965b292ff1c9274ceef46add /src
parent5.6.3-nightly.22 [skip ci] (diff)
downloadferdium-app-e59ef69833aad04b37d77b4428de738fdf098568.tar.gz
ferdium-app-e59ef69833aad04b37d77b4428de738fdf098568.tar.zst
ferdium-app-e59ef69833aad04b37d77b4428de738fdf098568.zip
chore: upgraded electron to 14.1.0 (#1860)
* upgrade 'electron-react-titlebar' to 1.0.0 * fix issue with 'contextIsolation' and 'enabelRemoteModule' for service-webview
Diffstat (limited to 'src')
-rw-r--r--src/components/auth/AuthLayout.js2
-rw-r--r--src/components/layout/AppLayout.js2
-rw-r--r--src/components/services/content/ServiceWebview.js3
-rw-r--r--src/index.js26
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 @@
1import React, { Component } from 'react'; 1import React, { Component } from 'react';
2import PropTypes from 'prop-types'; 2import PropTypes from 'prop-types';
3import { observer } from 'mobx-react'; 3import { observer } from 'mobx-react';
4import { TitleBar } from 'electron-react-titlebar'; 4import { TitleBar } from 'electron-react-titlebar/renderer';
5 5
6import { injectIntl } from 'react-intl'; 6import { injectIntl } from 'react-intl';
7import Link from '../ui/Link'; 7import 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';
2import PropTypes from 'prop-types'; 2import PropTypes from 'prop-types';
3import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; 3import { observer, PropTypes as MobxPropTypes } from 'mobx-react';
4import { defineMessages, injectIntl } from 'react-intl'; 4import { defineMessages, injectIntl } from 'react-intl';
5import { TitleBar } from 'electron-react-titlebar'; 5import { TitleBar } from 'electron-react-titlebar/renderer';
6import injectSheet from 'react-jss'; 6import injectSheet from 'react-jss';
7 7
8import InfoBar from '../ui/InfoBar'; 8import 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
44const debug = require('debug')('Ferdi:App'); 44const 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
49app.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
52debug('Set userAgent to ', userAgent()); 47debug('Set userAgent to ', userAgent());
53app.userAgentFallback = userAgent(); 48app.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