aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Menu.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2020-01-31 21:03:49 +0100
committerLibravatar vantezzen <hello@vantezzen.io>2020-01-31 21:03:49 +0100
commitd54ceb639862788c053e21f217ca39ac36003db6 (patch)
tree40bfd8bb6a8a85c222f9c67d7dd862a835394e80 /src/lib/Menu.js
parentAdd publish debug log option (diff)
parentMerge branch 'develop' of https://github.com/getferdi/ferdi into develop (diff)
downloadferdium-app-d54ceb639862788c053e21f217ca39ac36003db6.tar.gz
ferdium-app-d54ceb639862788c053e21f217ca39ac36003db6.tar.zst
ferdium-app-d54ceb639862788c053e21f217ca39ac36003db6.zip
Merge branch 'develop' into publish-debug
Diffstat (limited to 'src/lib/Menu.js')
-rw-r--r--src/lib/Menu.js37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index a858ec993..6167f1c59 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -396,10 +396,10 @@ const _templateFactory = intl => [
396 accelerator: 'Cmd+plus', 396 accelerator: 'Cmd+plus',
397 click() { 397 click() {
398 const activeService = getActiveWebview(); 398 const activeService = getActiveWebview();
399 activeService.getZoomLevel((level) => { 399 const level = activeService.getZoomLevel();
400 // level 9 =~ +300% and setZoomLevel wouldnt zoom in further 400
401 if (level < 9) activeService.setZoomLevel(level + 1); 401 // level 9 =~ +300% and setZoomLevel wouldnt zoom in further
402 }); 402 if (level < 9) activeService.setZoomLevel(level + 1);
403 }, 403 },
404 }, 404 },
405 { 405 {
@@ -407,10 +407,10 @@ const _templateFactory = intl => [
407 accelerator: 'Cmd+-', 407 accelerator: 'Cmd+-',
408 click() { 408 click() {
409 const activeService = getActiveWebview(); 409 const activeService = getActiveWebview();
410 activeService.getZoomLevel((level) => { 410 const level = activeService.getZoomLevel();
411 // level -9 =~ -50% and setZoomLevel wouldnt zoom out further 411
412 if (level > -9) activeService.setZoomLevel(level - 1); 412 // level -9 =~ -50% and setZoomLevel wouldnt zoom out further
413 }); 413 if (level > -9) activeService.setZoomLevel(level - 1);
414 }, 414 },
415 }, 415 },
416 { 416 {
@@ -602,10 +602,10 @@ const _titleBarTemplateFactory = intl => [
602 accelerator: `${ctrlKey}+=`, 602 accelerator: `${ctrlKey}+=`,
603 click() { 603 click() {
604 const activeService = getActiveWebview(); 604 const activeService = getActiveWebview();
605 activeService.getZoomLevel((level) => { 605 const level = activeService.getZoomLevel();
606 // level 9 =~ +300% and setZoomLevel wouldnt zoom in further 606
607 if (level < 9) activeService.setZoomLevel(level + 1); 607 // level 9 =~ +300% and setZoomLevel wouldnt zoom in further
608 }); 608 if (level < 9) activeService.setZoomLevel(level + 1);
609 }, 609 },
610 }, 610 },
611 { 611 {
@@ -613,10 +613,10 @@ const _titleBarTemplateFactory = intl => [
613 accelerator: `${ctrlKey}+-`, 613 accelerator: `${ctrlKey}+-`,
614 click() { 614 click() {
615 const activeService = getActiveWebview(); 615 const activeService = getActiveWebview();
616 activeService.getZoomLevel((level) => { 616 const level = activeService.getZoomLevel();
617 // level -9 =~ -50% and setZoomLevel wouldnt zoom out further 617
618 if (level > -9) activeService.setZoomLevel(level - 1); 618 // level -9 =~ -50% and setZoomLevel wouldnt zoom out further
619 }); 619 if (level > -9) activeService.setZoomLevel(level - 1);
620 }, 620 },
621 }, 621 },
622 { 622 {
@@ -804,7 +804,7 @@ export default class FranzMenu {
804 }, { 804 }, {
805 label: intl.formatMessage(menuItems.lockFerdi), 805 label: intl.formatMessage(menuItems.lockFerdi),
806 accelerator: 'CmdOrCtrl+Shift+L', 806 accelerator: 'CmdOrCtrl+Shift+L',
807 enabled: this.stores.settings.app.lockingFeatureEnabled, 807 enabled: this.stores.user.isLoggedIn && this.stores.settings.app.lockingFeatureEnabled,
808 click() { 808 click() {
809 // Disable lock first - otherwise the application might not update correctly 809 // Disable lock first - otherwise the application might not update correctly
810 actions.settings.update({ 810 actions.settings.update({
@@ -967,7 +967,8 @@ export default class FranzMenu {
967 967
968 this.currentTemplate = tpl; 968 this.currentTemplate = tpl;
969 const menu = Menu.buildFromTemplate(tpl); 969 const menu = Menu.buildFromTemplate(tpl);
970 Menu.setApplicationMenu(menu); 970 const lockedMenu = Menu.buildFromTemplate([]);
971 Menu.setApplicationMenu(this.stores.user.isLoggedIn && this.stores.settings.app.locked ? lockedMenu : menu);
971 } 972 }
972 973
973 serviceTpl() { 974 serviceTpl() {