diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2024-03-22 02:33:33 +0530 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2024-03-21 21:24:35 +0000 |
commit | 2f3f2ae7f098376f535e5aa993c9eedc14e36f5d (patch) | |
tree | d919bda212744493a7b66c2e91a75455421d62cc /src/lib/Menu.ts | |
parent | Upgrade electron to '29.1.5' (diff) | |
download | ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.gz ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.zst ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.zip |
Upgrade node modules
Diffstat (limited to 'src/lib/Menu.ts')
-rw-r--r-- | src/lib/Menu.ts | 60 |
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 @@ | |||
1 | import os from 'node:os'; | 1 | import os from 'node:os'; |
2 | import { clipboard, MenuItemConstructorOptions } from 'electron'; | ||
3 | import { | 2 | import { |
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'; |
11 | import { autorun, action, makeObservable, observable } from 'mobx'; | 10 | import { type MenuItemConstructorOptions, clipboard } from 'electron'; |
12 | import { defineMessages, IntlShape } from 'react-intl'; | ||
13 | import osName from 'os-name'; | ||
14 | import { fromJS } from 'immutable'; | 11 | import { fromJS } from 'immutable'; |
12 | import { action, autorun, makeObservable, observable } from 'mobx'; | ||
13 | import osName from 'os-name'; | ||
14 | import { type IntlShape, defineMessages } from 'react-intl'; | ||
15 | import semver from 'semver'; | 15 | import semver from 'semver'; |
16 | import type { StoresProps } from '../@types/ferdium-components.types'; | ||
17 | import { importExportURL, serverBase, serverName } from '../api/apiBase'; | ||
18 | // @ts-expect-error Cannot find module '../buildInfo.json' or its corresponding type declarations. | ||
19 | import { gitBranch, gitHashShort, timestamp } from '../buildInfo.json'; | ||
20 | import { CUSTOM_WEBSITE_RECIPE_ID, LIVE_API_FERDIUM_WEBSITE } from '../config'; | ||
16 | import { | 21 | import { |
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'; |
37 | import { CUSTOM_WEBSITE_RECIPE_ID, LIVE_API_FERDIUM_WEBSITE } from '../config'; | ||
38 | import { ferdiumVersion } from '../environment-remote'; | 42 | import { ferdiumVersion } from '../environment-remote'; |
39 | import { todoActions } from '../features/todos/actions'; | 43 | import { todoActions } from '../features/todos/actions'; |
40 | import workspaceActions from '../features/workspaces/actions'; | 44 | import workspaceActions from '../features/workspaces/actions'; |
41 | import { workspaceStore } from '../features/workspaces/index'; | 45 | import { workspaceStore } from '../features/workspaces/index'; |
42 | import { importExportURL, serverBase, serverName } from '../api/apiBase'; | 46 | import { onAuthGoToReleaseNotes } from '../helpers/update-helpers'; |
43 | import { openExternalUrl } from '../helpers/url-helpers'; | 47 | import { openExternalUrl } from '../helpers/url-helpers'; |
44 | import globalMessages from '../i18n/globalMessages'; | 48 | import globalMessages from '../i18n/globalMessages'; |
45 | import { onAuthGoToReleaseNotes } from '../helpers/update-helpers'; | ||
46 | // @ts-expect-error Cannot find module '../buildInfo.json' or its corresponding type declarations. | ||
47 | import { timestamp, gitHashShort, gitBranch } from '../buildInfo.json'; | ||
48 | import Service from '../models/Service'; | ||
49 | import { StoresProps } from '../@types/ferdium-components.types'; | ||
50 | import { RealStores } from '../stores'; | ||
51 | import { acceleratorString } from '../jsUtils'; | 49 | import { acceleratorString } from '../jsUtils'; |
50 | import type Service from '../models/Service'; | ||
51 | import type { RealStores } from '../stores'; | ||
52 | 52 | ||
53 | const menuItems = defineMessages({ | 53 | const 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 { |