aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Menu.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Menu.ts')
-rw-r--r--src/lib/Menu.ts60
1 files changed, 29 insertions, 31 deletions
diff --git a/src/lib/Menu.ts b/src/lib/Menu.ts
index 12dc1e42c..f7ed3b310 100644
--- a/src/lib/Menu.ts
+++ b/src/lib/Menu.ts
@@ -1,54 +1,54 @@
1import os from 'node:os'; 1import os from 'node:os';
2import { clipboard, MenuItemConstructorOptions } from 'electron';
3import { 2import {
4 app,
5 Menu, 3 Menu,
4 app,
6 dialog, 5 dialog,
7 webContents,
8 systemPreferences,
9 getCurrentWindow, 6 getCurrentWindow,
7 systemPreferences,
8 webContents,
10} from '@electron/remote'; 9} from '@electron/remote';
11import { autorun, action, makeObservable, observable } from 'mobx'; 10import { type MenuItemConstructorOptions, clipboard } from 'electron';
12import { defineMessages, IntlShape } from 'react-intl';
13import osName from 'os-name';
14import { fromJS } from 'immutable'; 11import { fromJS } from 'immutable';
12import { action, autorun, makeObservable, observable } from 'mobx';
13import osName from 'os-name';
14import { type IntlShape, defineMessages } from 'react-intl';
15import semver from 'semver'; 15import semver from 'semver';
16import type { StoresProps } from '../@types/ferdium-components.types';
17import { importExportURL, serverBase, serverName } from '../api/apiBase';
18// @ts-expect-error Cannot find module '../buildInfo.json' or its corresponding type declarations.
19import { gitBranch, gitHashShort, timestamp } from '../buildInfo.json';
20import { CUSTOM_WEBSITE_RECIPE_ID, LIVE_API_FERDIUM_WEBSITE } from '../config';
16import { 21import {
17 isWindows, 22 addNewServiceShortcutKey,
18 cmdOrCtrlShortcutKey,
19 altKey, 23 altKey,
20 shiftKey, 24 chromeVersion,
21 settingsShortcutKey, 25 cmdOrCtrlShortcutKey,
26 downloadsShortcutKey,
27 electronVersion,
22 isLinux, 28 isLinux,
23 isMac, 29 isMac,
30 isWindows,
24 lockFerdiumShortcutKey, 31 lockFerdiumShortcutKey,
25 todosToggleShortcutKey,
26 workspaceToggleShortcutKey,
27 addNewServiceShortcutKey,
28 splitModeToggleShortcutKey,
29 muteFerdiumShortcutKey, 32 muteFerdiumShortcutKey,
30 electronVersion,
31 chromeVersion,
32 nodeVersion, 33 nodeVersion,
33 osArch, 34 osArch,
35 settingsShortcutKey,
36 shiftKey,
37 splitModeToggleShortcutKey,
38 todosToggleShortcutKey,
34 toggleFullScreenKey, 39 toggleFullScreenKey,
35 downloadsShortcutKey, 40 workspaceToggleShortcutKey,
36} from '../environment'; 41} from '../environment';
37import { CUSTOM_WEBSITE_RECIPE_ID, LIVE_API_FERDIUM_WEBSITE } from '../config';
38import { ferdiumVersion } from '../environment-remote'; 42import { ferdiumVersion } from '../environment-remote';
39import { todoActions } from '../features/todos/actions'; 43import { todoActions } from '../features/todos/actions';
40import workspaceActions from '../features/workspaces/actions'; 44import workspaceActions from '../features/workspaces/actions';
41import { workspaceStore } from '../features/workspaces/index'; 45import { workspaceStore } from '../features/workspaces/index';
42import { importExportURL, serverBase, serverName } from '../api/apiBase'; 46import { onAuthGoToReleaseNotes } from '../helpers/update-helpers';
43import { openExternalUrl } from '../helpers/url-helpers'; 47import { openExternalUrl } from '../helpers/url-helpers';
44import globalMessages from '../i18n/globalMessages'; 48import globalMessages from '../i18n/globalMessages';
45import { onAuthGoToReleaseNotes } from '../helpers/update-helpers';
46// @ts-expect-error Cannot find module '../buildInfo.json' or its corresponding type declarations.
47import { timestamp, gitHashShort, gitBranch } from '../buildInfo.json';
48import Service from '../models/Service';
49import { StoresProps } from '../@types/ferdium-components.types';
50import { RealStores } from '../stores';
51import { acceleratorString } from '../jsUtils'; 49import { acceleratorString } from '../jsUtils';
50import type Service from '../models/Service';
51import type { RealStores } from '../stores';
52 52
53const menuItems = defineMessages({ 53const menuItems = defineMessages({
54 edit: { 54 edit: {
@@ -688,11 +688,9 @@ class FranzMenu implements StoresProps {
688 } 688 }
689 689
690 getOsName(): string { 690 getOsName(): string {
691 let osNameParse = osName(); 691 return isWindows && semver.satisfies(os.release(), '>=10.0.22000')
692 const isWin11 = semver.satisfies(os.release(), '>=10.0.22000'); 692 ? 'Windows 11'
693 osNameParse = isWindows && isWin11 ? 'Windows 11' : osNameParse; 693 : osName(os.platform(), os.release());
694
695 return osNameParse;
696 } 694 }
697 695
698 _build(): void { 696 _build(): void {