diff options
author | Vijay A <avijayr@protonmail.com> | 2021-09-13 11:44:22 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-09-13 11:50:17 +0530 |
commit | af56a07359400e53cb3096e321bf6ee1bae12068 (patch) | |
tree | 10aeed9aa2650d45c81cff9930ad36b7cac86c3b /src/index.js | |
parent | Better implementation of confirmation while quitting Ferdi (#1919) (diff) | |
download | ferdium-app-af56a07359400e53cb3096e321bf6ee1bae12068.tar.gz ferdium-app-af56a07359400e53cb3096e321bf6ee1bae12068.tar.zst ferdium-app-af56a07359400e53cb3096e321bf6ee1bae12068.zip |
refactor: reuse method from the core electron framework for the 'About' dialog.
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js index 7f1f77b4e..1f3510361 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -10,6 +10,7 @@ import ms from 'ms'; | |||
10 | 10 | ||
11 | require('@electron/remote/main').initialize(); | 11 | require('@electron/remote/main').initialize(); |
12 | 12 | ||
13 | import osName from 'os-name'; | ||
13 | import { DEFAULT_WINDOW_OPTIONS } from './config'; | 14 | import { DEFAULT_WINDOW_OPTIONS } from './config'; |
14 | 15 | ||
15 | import { | 16 | import { |
@@ -18,9 +19,12 @@ import { | |||
18 | isMac, | 19 | isMac, |
19 | isWindows, | 20 | isWindows, |
20 | isLinux, | 21 | isLinux, |
21 | aboutAppDetails, | ||
22 | userDataRecipesPath, | 22 | userDataRecipesPath, |
23 | userDataPath, | 23 | userDataPath, |
24 | ferdiVersion, | ||
25 | electronVersion, | ||
26 | chromeVersion, | ||
27 | nodeVersion, | ||
24 | } from './environment'; | 28 | } from './environment'; |
25 | import { ifUndefinedBoolean } from './jsUtils'; | 29 | import { ifUndefinedBoolean } from './jsUtils'; |
26 | 30 | ||
@@ -37,6 +41,7 @@ import './electron/exception'; | |||
37 | import { asarPath } from './helpers/asar-helpers'; | 41 | import { asarPath } from './helpers/asar-helpers'; |
38 | import { openExternalUrl } from './helpers/url-helpers'; | 42 | import { openExternalUrl } from './helpers/url-helpers'; |
39 | import userAgent from './helpers/userAgent-helpers'; | 43 | import userAgent from './helpers/userAgent-helpers'; |
44 | import * as buildInfo from './buildInfo.json'; // eslint-disable-line import/no-unresolved | ||
40 | 45 | ||
41 | const debug = require('debug')('Ferdi:App'); | 46 | const debug = require('debug')('Ferdi:App'); |
42 | 47 | ||
@@ -155,7 +160,17 @@ if (!retrieveSettingValue('enableGPUAcceleration', false)) { | |||
155 | } | 160 | } |
156 | 161 | ||
157 | app.setAboutPanelOptions({ | 162 | app.setAboutPanelOptions({ |
158 | applicationVersion: aboutAppDetails(), | 163 | applicationVersion: [ |
164 | `Version: ${ferdiVersion}`, | ||
165 | `Electron: ${electronVersion}`, | ||
166 | `Chrome: ${chromeVersion}`, | ||
167 | `Node.js: ${nodeVersion}`, | ||
168 | `Platform: ${osName()}`, | ||
169 | `Arch: ${process.arch}`, | ||
170 | `Build date: ${new Date(Number(buildInfo.timestamp))}`, | ||
171 | `Git SHA: ${buildInfo.gitHashShort}`, | ||
172 | `Git branch: ${buildInfo.gitBranch}`, | ||
173 | ].join('\n'), | ||
159 | version: '', | 174 | version: '', |
160 | }); | 175 | }); |
161 | 176 | ||