aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-07-11 17:24:11 +0100
committerLibravatar GitHub <noreply@github.com>2022-07-11 17:24:11 +0100
commit71ce315dce626bec5bbf99ef64d773c312d37bd2 (patch)
tree6b898f58eafd2529b97f26079faaa406d1d36621 /src
parentFix blank screen after in-app update on Windows (#464) (diff)
downloadferdium-app-71ce315dce626bec5bbf99ef64d773c312d37bd2.tar.gz
ferdium-app-71ce315dce626bec5bbf99ef64d773c312d37bd2.tar.zst
ferdium-app-71ce315dce626bec5bbf99ef64d773c312d37bd2.zip
Fix Windows 11 Platform message (#465)
Fix Windows 11 Plataform message
Diffstat (limited to 'src')
-rw-r--r--src/lib/Menu.js26
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 {
10import { autorun, makeObservable, observable } from 'mobx'; 10import { autorun, makeObservable, observable } from 'mobx';
11import { defineMessages } from 'react-intl'; 11import { defineMessages } from 'react-intl';
12import osName from 'os-name'; 12import osName from 'os-name';
13import { fromJS } from "immutable"; 13import { fromJS } from 'immutable';
14import { 14import semver from 'semver';
15 CUSTOM_WEBSITE_RECIPE_ID, 15import os from 'os';
16 GITHUB_FERDIUM_URL,
17 LIVE_API_FERDIUM_WEBSITE,
18} from '../config';
19import { 16import {
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';
35import {
36 CUSTOM_WEBSITE_RECIPE_ID,
37 GITHUB_FERDIUM_URL,
38 LIVE_API_FERDIUM_WEBSITE,
39} from '../config';
37import { ferdiumVersion } from '../environment-remote'; 40import { ferdiumVersion } from '../environment-remote';
38import { todoActions } from '../features/todos/actions'; 41import { todoActions } from '../features/todos/actions';
39import workspaceActions from '../features/workspaces/actions'; 42import 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}`,