aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Menu.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <properly@protonmail.com>2019-09-17 12:14:48 +0200
committerLibravatar vantezzen <properly@protonmail.com>2019-09-17 12:14:48 +0200
commitd14071f3503f768c9c0e040dee549be6a6b40e5f (patch)
treeb6c945c8b4baf31344dbabd2ac555559285ebec6 /src/lib/Menu.js
parentAdd "npm run prepare-code" command (diff)
downloadferdium-app-d14071f3503f768c9c0e040dee549be6a6b40e5f.tar.gz
ferdium-app-d14071f3503f768c9c0e040dee549be6a6b40e5f.tar.zst
ferdium-app-d14071f3503f768c9c0e040dee549be6a6b40e5f.zip
Implement #41
Diffstat (limited to 'src/lib/Menu.js')
-rw-r--r--src/lib/Menu.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index f5d24951c..9d8f1ba81 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -121,6 +121,10 @@ const menuItems = defineMessages({
121 id: 'menu.view.reloadFranz', 121 id: 'menu.view.reloadFranz',
122 defaultMessage: '!!!Reload Ferdi', 122 defaultMessage: '!!!Reload Ferdi',
123 }, 123 },
124 lockFerdi: {
125 id: 'menu.view.lockFerdi',
126 defaultMessage: '!!!Lock Ferdi',
127 },
124 minimize: { 128 minimize: {
125 id: 'menu.window.minimize', 129 id: 'menu.window.minimize',
126 defaultMessage: '!!!Minimize', 130 defaultMessage: '!!!Minimize',
@@ -659,6 +663,7 @@ export default class FranzMenu {
659 663
660 const { intl } = window.ferdi; 664 const { intl } = window.ferdi;
661 const tpl = isMac ? _templateFactory(intl) : _titleBarTemplateFactory(intl); 665 const tpl = isMac ? _templateFactory(intl) : _titleBarTemplateFactory(intl);
666 const { actions } = this;
662 667
663 tpl[1].submenu.push({ 668 tpl[1].submenu.push({
664 type: 'separator', 669 type: 'separator',
@@ -706,6 +711,20 @@ export default class FranzMenu {
706 click: () => { 711 click: () => {
707 window.location.reload(); 712 window.location.reload();
708 }, 713 },
714 }, {
715 type: 'separator',
716 }, {
717 label: intl.formatMessage(menuItems.lockFerdi),
718 accelerator: 'CmdOrCtrl+Shift+L',
719 enabled: this.stores.settings.app.lockingFeatureEnabled,
720 click() {
721 actions.settings.update({
722 type: 'app',
723 data: {
724 locked: true,
725 },
726 });
727 },
709 }); 728 });
710 729
711 tpl.unshift({ 730 tpl.unshift({