diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-05-12 01:26:51 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 21:56:51 +0200 |
commit | 80d7ef19dbb4271416bd8b5bbf938e180c57e5f3 (patch) | |
tree | ec99db3b3b0727d7ac81c1ead70e17db0c1bb6b3 /src/lib/Menu.js | |
parent | Fixing issue with icons being garbled due to misconfiguration of gulp (diff) | |
download | ferdium-app-80d7ef19dbb4271416bd8b5bbf938e180c57e5f3.tar.gz ferdium-app-80d7ef19dbb4271416bd8b5bbf938e180c57e5f3.tar.zst ferdium-app-80d7ef19dbb4271416bd8b5bbf938e180c57e5f3.zip |
Method reuse (#1379)
* Used already exported common functions to avoid the same logic being repeated.
* Use a different package to retrieve the os-name for the 'About Dialog'.
Diffstat (limited to 'src/lib/Menu.js')
-rw-r--r-- | src/lib/Menu.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index d85f5706c..7bd273f6f 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -10,6 +10,9 @@ import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants'; | |||
10 | import { workspaceActions } from '../features/workspaces/actions'; | 10 | import { workspaceActions } from '../features/workspaces/actions'; |
11 | import { workspaceStore } from '../features/workspaces/index'; | 11 | import { workspaceStore } from '../features/workspaces/index'; |
12 | import * as buildInfo from '../buildInfo.json'; // eslint-disable-line import/no-unresolved | 12 | import * as buildInfo from '../buildInfo.json'; // eslint-disable-line import/no-unresolved |
13 | import { ferdiVersion } from '../helpers/userAgent-helpers'; | ||
14 | |||
15 | const osName = require('os-name'); | ||
13 | 16 | ||
14 | const { | 17 | const { |
15 | app, Menu, dialog, systemPreferences, | 18 | app, Menu, dialog, systemPreferences, |
@@ -1025,7 +1028,7 @@ export default class FranzMenu { | |||
1025 | type: 'info', | 1028 | type: 'info', |
1026 | title: 'Franz Ferdinand', | 1029 | title: 'Franz Ferdinand', |
1027 | message: 'Ferdi', | 1030 | message: 'Ferdi', |
1028 | detail: `Version: ${remote.app.getVersion()}\nElectron: ${process.versions.electron}\nNode.js: ${process.version}\nPlatform: ${process.platform}\nArch: ${process.arch}\nBuild date: ${new Date(Number(buildInfo.timestamp))}\nGit SHA: ${buildInfo.gitHashShort}\nGit branch: ${buildInfo.gitBranch}`, | 1031 | detail: `Version: ${ferdiVersion}\nElectron: ${process.versions.electron}\nNode.js: ${process.version}\nPlatform: ${osName()}\nArch: ${process.arch}\nBuild date: ${new Date(Number(buildInfo.timestamp))}\nGit SHA: ${buildInfo.gitHashShort}\nGit branch: ${buildInfo.gitBranch}`, |
1029 | }); | 1032 | }); |
1030 | }, | 1033 | }, |
1031 | }; | 1034 | }; |