diff options
Diffstat (limited to 'src/lib/Menu.js')
-rw-r--r-- | src/lib/Menu.js | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 8904919f9..e0a5a5bcd 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -10,13 +10,11 @@ import { | |||
10 | import { autorun, makeObservable, observable } from 'mobx'; | 10 | import { autorun, makeObservable, observable } from 'mobx'; |
11 | import { defineMessages } from 'react-intl'; | 11 | import { defineMessages } from 'react-intl'; |
12 | import osName from 'os-name'; | 12 | import osName from 'os-name'; |
13 | import { fromJS } from "immutable"; | 13 | import { fromJS } from 'immutable'; |
14 | import { | 14 | import semver from 'semver'; |
15 | CUSTOM_WEBSITE_RECIPE_ID, | 15 | import os from 'os'; |
16 | GITHUB_FERDIUM_URL, | ||
17 | LIVE_API_FERDIUM_WEBSITE, | ||
18 | } from '../config'; | ||
19 | import { | 16 | import { |
17 | isWindows, | ||
20 | cmdOrCtrlShortcutKey, | 18 | cmdOrCtrlShortcutKey, |
21 | altKey, | 19 | altKey, |
22 | shiftKey, | 20 | shiftKey, |
@@ -34,6 +32,11 @@ import { | |||
34 | nodeVersion, | 32 | nodeVersion, |
35 | osArch, | 33 | osArch, |
36 | } from '../environment'; | 34 | } from '../environment'; |
35 | import { | ||
36 | CUSTOM_WEBSITE_RECIPE_ID, | ||
37 | GITHUB_FERDIUM_URL, | ||
38 | LIVE_API_FERDIUM_WEBSITE, | ||
39 | } from '../config'; | ||
37 | import { ferdiumVersion } from '../environment-remote'; | 40 | import { ferdiumVersion } from '../environment-remote'; |
38 | import { todoActions } from '../features/todos/actions'; | 41 | import { todoActions } from '../features/todos/actions'; |
39 | import workspaceActions from '../features/workspaces/actions'; | 42 | import workspaceActions from '../features/workspaces/actions'; |
@@ -642,6 +645,15 @@ class FranzMenu { | |||
642 | return fromJS(this.currentTemplate).toJS(); | 645 | return fromJS(this.currentTemplate).toJS(); |
643 | } | 646 | } |
644 | 647 | ||
648 | getOsName() { | ||
649 | let osNameParse = osName(); | ||
650 | const isWin11 = semver.satisfies(os.release(), '>=10.0.22000'); | ||
651 | |||
652 | osNameParse = isWindows && isWin11 ? 'Windows 11' : osNameParse; | ||
653 | |||
654 | return osNameParse; | ||
655 | } | ||
656 | |||
645 | _build() { | 657 | _build() { |
646 | // need to clone object so we don't modify computed (cached) object | 658 | // need to clone object so we don't modify computed (cached) object |
647 | const serviceTpl = Object.assign([], this.serviceTpl()); | 659 | const serviceTpl = Object.assign([], this.serviceTpl()); |
@@ -877,7 +889,7 @@ class FranzMenu { | |||
877 | `Electron: ${electronVersion}`, | 889 | `Electron: ${electronVersion}`, |
878 | `Chrome: ${chromeVersion}`, | 890 | `Chrome: ${chromeVersion}`, |
879 | `Node.js: ${nodeVersion}`, | 891 | `Node.js: ${nodeVersion}`, |
880 | `Platform: ${osName()}`, | 892 | `Platform: ${this.getOsName()}`, |
881 | `Arch: ${osArch}`, | 893 | `Arch: ${osArch}`, |
882 | `Build date: ${new Date(Number(buildInfo.timestamp))}`, | 894 | `Build date: ${new Date(Number(buildInfo.timestamp))}`, |
883 | `Git SHA: ${buildInfo.gitHashShort}`, | 895 | `Git SHA: ${buildInfo.gitHashShort}`, |