aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
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/index.js
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/index.js')
-rw-r--r--src/index.js26
1 files changed, 13 insertions, 13 deletions
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