diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/environment.js | 16 | ||||
-rw-r--r-- | src/index.js | 19 | ||||
-rw-r--r-- | src/lib/Menu.js | 10 |
3 files changed, 26 insertions, 19 deletions
diff --git a/src/environment.js b/src/environment.js index 9d7ffaf78..b30e3778d 100644 --- a/src/environment.js +++ b/src/environment.js | |||
@@ -5,6 +5,7 @@ import { is, api as electronApi } from 'electron-util'; | |||
5 | 5 | ||
6 | import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; | 6 | import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; |
7 | 7 | ||
8 | import osName from 'os-name'; | ||
8 | import { | 9 | import { |
9 | LIVE_FERDI_API, | 10 | LIVE_FERDI_API, |
10 | DEV_FRANZ_API, | 11 | DEV_FRANZ_API, |
@@ -23,6 +24,7 @@ import { | |||
23 | } from './config'; | 24 | } from './config'; |
24 | 25 | ||
25 | import { asarPath } from './helpers/asar-helpers'; | 26 | import { asarPath } from './helpers/asar-helpers'; |
27 | import * as buildInfo from './buildInfo.json'; // eslint-disable-line import/no-unresolved | ||
26 | 28 | ||
27 | export const { app } = electronApi; | 29 | export const { app } = electronApi; |
28 | export const ferdiVersion = app.getVersion(); | 30 | export const ferdiVersion = app.getVersion(); |
@@ -171,3 +173,17 @@ export const DEFAULT_APP_SETTINGS = { | |||
171 | alwaysShowWorkspaces: false, | 173 | alwaysShowWorkspaces: false, |
172 | liftSingleInstanceLock: false, | 174 | liftSingleInstanceLock: false, |
173 | }; | 175 | }; |
176 | |||
177 | export function aboutAppDetails() { | ||
178 | return [ | ||
179 | `Version: ${ferdiVersion}`, | ||
180 | `Electron: ${electronVersion}`, | ||
181 | `Chrome: ${chromeVersion}`, | ||
182 | `Node.js: ${nodeVersion}`, | ||
183 | `Platform: ${osName()}`, | ||
184 | `Arch: ${process.arch}`, | ||
185 | `Build date: ${new Date(Number(buildInfo.timestamp))}`, | ||
186 | `Git SHA: ${buildInfo.gitHashShort}`, | ||
187 | `Git branch: ${buildInfo.gitBranch}`, | ||
188 | ].join('\n'); | ||
189 | } | ||
diff --git a/src/index.js b/src/index.js index 1f3510361..7f1f77b4e 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -10,7 +10,6 @@ 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'; | ||
14 | import { DEFAULT_WINDOW_OPTIONS } from './config'; | 13 | import { DEFAULT_WINDOW_OPTIONS } from './config'; |
15 | 14 | ||
16 | import { | 15 | import { |
@@ -19,12 +18,9 @@ import { | |||
19 | isMac, | 18 | isMac, |
20 | isWindows, | 19 | isWindows, |
21 | isLinux, | 20 | isLinux, |
21 | aboutAppDetails, | ||
22 | userDataRecipesPath, | 22 | userDataRecipesPath, |
23 | userDataPath, | 23 | userDataPath, |
24 | ferdiVersion, | ||
25 | electronVersion, | ||
26 | chromeVersion, | ||
27 | nodeVersion, | ||
28 | } from './environment'; | 24 | } from './environment'; |
29 | import { ifUndefinedBoolean } from './jsUtils'; | 25 | import { ifUndefinedBoolean } from './jsUtils'; |
30 | 26 | ||
@@ -41,7 +37,6 @@ import './electron/exception'; | |||
41 | import { asarPath } from './helpers/asar-helpers'; | 37 | import { asarPath } from './helpers/asar-helpers'; |
42 | import { openExternalUrl } from './helpers/url-helpers'; | 38 | import { openExternalUrl } from './helpers/url-helpers'; |
43 | import userAgent from './helpers/userAgent-helpers'; | 39 | import userAgent from './helpers/userAgent-helpers'; |
44 | import * as buildInfo from './buildInfo.json'; // eslint-disable-line import/no-unresolved | ||
45 | 40 | ||
46 | const debug = require('debug')('Ferdi:App'); | 41 | const debug = require('debug')('Ferdi:App'); |
47 | 42 | ||
@@ -160,17 +155,7 @@ if (!retrieveSettingValue('enableGPUAcceleration', false)) { | |||
160 | } | 155 | } |
161 | 156 | ||
162 | app.setAboutPanelOptions({ | 157 | app.setAboutPanelOptions({ |
163 | applicationVersion: [ | 158 | applicationVersion: aboutAppDetails(), |
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'), | ||
174 | version: '', | 159 | version: '', |
175 | }); | 160 | }); |
176 | 161 | ||
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index d7f3dbecf..623638d33 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -1,5 +1,5 @@ | |||
1 | import { clipboard } from 'electron'; | 1 | import { clipboard } from 'electron'; |
2 | import { app, Menu, systemPreferences } from '@electron/remote'; | 2 | import { app, Menu, dialog, systemPreferences } from '@electron/remote'; |
3 | import { autorun, observable } from 'mobx'; | 3 | import { autorun, observable } from 'mobx'; |
4 | import { defineMessages } from 'react-intl'; | 4 | import { defineMessages } from 'react-intl'; |
5 | import { | 5 | import { |
@@ -14,6 +14,7 @@ import { | |||
14 | settingsShortcutKey, | 14 | settingsShortcutKey, |
15 | isLinux, | 15 | isLinux, |
16 | isMac, | 16 | isMac, |
17 | aboutAppDetails, | ||
17 | lockFerdiShortcutKey, | 18 | lockFerdiShortcutKey, |
18 | todosToggleShortcutKey, | 19 | todosToggleShortcutKey, |
19 | workspaceToggleShortcutKey, | 20 | workspaceToggleShortcutKey, |
@@ -804,7 +805,12 @@ class FranzMenu { | |||
804 | const about = { | 805 | const about = { |
805 | label: intl.formatMessage(menuItems.about), | 806 | label: intl.formatMessage(menuItems.about), |
806 | click: () => { | 807 | click: () => { |
807 | app.showAboutPanel(); | 808 | dialog.showMessageBox({ |
809 | type: 'info', | ||
810 | title: 'Franz Ferdinand', | ||
811 | message: 'Ferdi', | ||
812 | detail: aboutAppDetails(), | ||
813 | }); | ||
808 | }, | 814 | }, |
809 | }; | 815 | }; |
810 | 816 | ||