aboutsummaryrefslogtreecommitdiffstats
path: root/src/index.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-07-03 09:43:22 +0530
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-07-04 15:24:59 +0530
commit8fc02b903755bfd209edb1744cc82743aa41ba18 (patch)
treebe2ae18db1aea93de6ceb8c2d00d4cd7a55cd1a1 /src/index.js
parentFixed issue with not being able to add new service. (diff)
downloadferdium-app-8fc02b903755bfd209edb1744cc82743aa41ba18.tar.gz
ferdium-app-8fc02b903755bfd209edb1744cc82743aa41ba18.tar.zst
ferdium-app-8fc02b903755bfd209edb1744cc82743aa41ba18.zip
Use utility methods from 'electron-util'
(already a dependency) rather than re-implementing by ourselves.
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/index.js b/src/index.js
index d3b996540..8a4283f49 100644
--- a/src/index.js
+++ b/src/index.js
@@ -24,6 +24,7 @@ import {
24 isMac, 24 isMac,
25 isWindows, 25 isWindows,
26 isLinux, 26 isLinux,
27 aboutAppDetails,
27} from './environment'; 28} from './environment';
28 29
29import { mainIpcHandler as basicAuthHandler } from './features/basicAuth'; 30import { mainIpcHandler as basicAuthHandler } from './features/basicAuth';
@@ -34,14 +35,12 @@ import Settings from './electron/Settings';
34import handleDeepLink from './electron/deepLinking'; 35import handleDeepLink from './electron/deepLinking';
35import { isPositionValid } from './electron/windowUtils'; 36import { isPositionValid } from './electron/windowUtils';
36import { appId } from './package.json'; // eslint-disable-line import/no-unresolved 37import { appId } from './package.json'; // eslint-disable-line import/no-unresolved
37import * as buildInfo from './buildInfo.json'; // eslint-disable-line import/no-unresolved
38import './electron/exception'; 38import './electron/exception';
39 39
40import { asarPath } from './helpers/asar-helpers'; 40import { asarPath } from './helpers/asar-helpers';
41import { isValidExternalURL } from './helpers/url-helpers'; 41import { isValidExternalURL } from './helpers/url-helpers';
42import userAgent, { ferdiVersion } from './helpers/userAgent-helpers'; 42import userAgent from './helpers/userAgent-helpers';
43 43
44const osName = require('os-name');
45const debug = require('debug')('Ferdi:App'); 44const debug = require('debug')('Ferdi:App');
46 45
47// From Electron 9 onwards, app.allowRendererProcessReuse = true by default. This causes the app to crash on Windows due to the 46// From Electron 9 onwards, app.allowRendererProcessReuse = true by default. This causes the app to crash on Windows due to the
@@ -147,7 +146,7 @@ if (!settings.get('enableGPUAcceleration')) {
147} 146}
148 147
149app.setAboutPanelOptions({ 148app.setAboutPanelOptions({
150 applicationVersion: `Version: ${ferdiVersion}\nElectron: ${process.versions.electron}\nChrome: ${process.versions.chrome}\nNode.js: ${process.versions.node}\nPlatform: ${osName()}\nArch: ${process.arch}\nBuild date: ${new Date(Number(buildInfo.timestamp))}\nGit SHA: ${buildInfo.gitHashShort}\nGit branch: ${buildInfo.gitBranch}`, 149 applicationVersion: aboutAppDetails(),
151 version: '', 150 version: '',
152}); 151});
153 152
@@ -156,7 +155,7 @@ const createWindow = () => {
156 const mainWindowState = windowStateKeeper({ 155 const mainWindowState = windowStateKeeper({
157 defaultWidth: DEFAULT_WINDOW_OPTIONS.width, 156 defaultWidth: DEFAULT_WINDOW_OPTIONS.width,
158 defaultHeight: DEFAULT_WINDOW_OPTIONS.height, 157 defaultHeight: DEFAULT_WINDOW_OPTIONS.height,
159 maximize: true, // Automatically maximizes the window, if it was last clsoed maximized 158 maximize: true, // Automatically maximizes the window, if it was last closed maximized
160 fullScreen: true, // Automatically restores the window to full screen, if it was last closed full screen 159 fullScreen: true, // Automatically restores the window to full screen, if it was last closed full screen
161 }); 160 });
162 161