aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2023-05-24 06:57:50 +0530
committerLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2023-05-24 16:40:43 +0530
commite245b4fa229bee1e2ab97fcb42de3831b8bdbe5b (patch)
treed684777b3fde5470c9f99304a9f022422ffb8045 /src/lib
parent6.3.0-nightly.9 [skip ci] (diff)
downloadferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.tar.gz
ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.tar.zst
ferdium-app-e245b4fa229bee1e2ab97fcb42de3831b8bdbe5b.zip
Upgrade npm modules
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Menu.ts64
1 files changed, 32 insertions, 32 deletions
diff --git a/src/lib/Menu.ts b/src/lib/Menu.ts
index b1510cec3..936785b9b 100644
--- a/src/lib/Menu.ts
+++ b/src/lib/Menu.ts
@@ -453,7 +453,7 @@ function titleBarTemplateFactory(
453 }, 453 },
454 { 454 {
455 label: intl.formatMessage(menuItems.back), 455 label: intl.formatMessage(menuItems.back),
456 accelerator: `${!isMac ? altKey() : cmdOrCtrlShortcutKey()}+Left`, 456 accelerator: `${isMac ? cmdOrCtrlShortcutKey() : altKey()}+Left`,
457 click() { 457 click() {
458 const activeService = getActiveService(); 458 const activeService = getActiveService();
459 if (!activeService) { 459 if (!activeService) {
@@ -464,7 +464,7 @@ function titleBarTemplateFactory(
464 }, 464 },
465 { 465 {
466 label: intl.formatMessage(menuItems.forward), 466 label: intl.formatMessage(menuItems.forward),
467 accelerator: `${!isMac ? altKey() : cmdOrCtrlShortcutKey()}+Right`, 467 accelerator: `${isMac ? cmdOrCtrlShortcutKey() : altKey()}+Right`,
468 click() { 468 click() {
469 const activeService = getActiveService(); 469 const activeService = getActiveService();
470 if (!activeService) { 470 if (!activeService) {
@@ -728,7 +728,36 @@ class FranzMenu implements StoresProps {
728 }); 728 });
729 } 729 }
730 730
731 if (!locked) { 731 if (locked) {
732 const touchIdEnabled = isMac
733 ? this.stores.settings.app.useTouchIdToUnlock &&
734 systemPreferences.canPromptTouchID()
735 : false;
736
737 (tpl[0].submenu as MenuItemConstructorOptions[]).unshift(
738 {
739 label: intl.formatMessage(menuItems.touchId),
740 accelerator: `${lockFerdiumShortcutKey()}`,
741 visible: touchIdEnabled,
742 click() {
743 systemPreferences
744 .promptTouchID(intl.formatMessage(menuItems.touchId))
745 .then(() => {
746 actions.settings.update({
747 type: 'app',
748 data: {
749 locked: false,
750 },
751 });
752 });
753 },
754 },
755 {
756 type: 'separator',
757 visible: touchIdEnabled,
758 },
759 );
760 } else {
732 (tpl[1].submenu as MenuItemConstructorOptions[]).push( 761 (tpl[1].submenu as MenuItemConstructorOptions[]).push(
733 { 762 {
734 type: 'separator', 763 type: 'separator',
@@ -834,35 +863,6 @@ class FranzMenu implements StoresProps {
834 tpl[3].submenu = this.workspacesMenu(); 863 tpl[3].submenu = this.workspacesMenu();
835 864
836 tpl[4].submenu = this.todosMenu(); 865 tpl[4].submenu = this.todosMenu();
837 } else {
838 const touchIdEnabled = isMac
839 ? this.stores.settings.app.useTouchIdToUnlock &&
840 systemPreferences.canPromptTouchID()
841 : false;
842
843 (tpl[0].submenu as MenuItemConstructorOptions[]).unshift(
844 {
845 label: intl.formatMessage(menuItems.touchId),
846 accelerator: `${lockFerdiumShortcutKey()}`,
847 visible: touchIdEnabled,
848 click() {
849 systemPreferences
850 .promptTouchID(intl.formatMessage(menuItems.touchId))
851 .then(() => {
852 actions.settings.update({
853 type: 'app',
854 data: {
855 locked: false,
856 },
857 });
858 });
859 },
860 },
861 {
862 type: 'separator',
863 visible: touchIdEnabled,
864 },
865 );
866 } 866 }
867 867
868 tpl.unshift({ 868 tpl.unshift({