aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorLibravatar Amine Mouafik <amine@mouafik.fr>2020-02-28 03:29:23 +0100
committerLibravatar Amine Mouafik <amine@mouafik.fr>2020-02-28 03:29:23 +0100
commitd98d728612c3db75ddf15cc24e93e121a7a91fb1 (patch)
treef054f8decec93f702453072c13ee1d99b8799fd7 /src/lib
parentDo not include debug menu items when locked (diff)
parentMerge pull request #393 from getferdi/refactor/lock (diff)
downloadferdium-app-d98d728612c3db75ddf15cc24e93e121a7a91fb1.tar.gz
ferdium-app-d98d728612c3db75ddf15cc24e93e121a7a91fb1.tar.zst
ferdium-app-d98d728612c3db75ddf15cc24e93e121a7a91fb1.zip
Merge branch 'develop' into fix/lock-menu
# Conflicts: # src/lib/Menu.js
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Menu.js27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index 56276ce2d..2ac7e4465 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -1,15 +1,15 @@
1import { remote, shell, clipboard } from 'electron'; 1import { clipboard, remote, shell } from 'electron';
2import { observable, autorun } from 'mobx'; 2import { autorun, observable } from 'mobx';
3import { defineMessages } from 'react-intl'; 3import { defineMessages } from 'react-intl';
4 4import { cmdKey, ctrlKey, isMac } from '../environment';
5import { isMac, ctrlKey, cmdKey } from '../environment';
6import { workspaceStore } from '../features/workspaces/index';
7import { workspaceActions } from '../features/workspaces/actions';
8import { announcementActions } from '../features/announcements/actions';
9import { announcementsStore } from '../features/announcements'; 5import { announcementsStore } from '../features/announcements';
6import { announcementActions } from '../features/announcements/actions';
10import { todosStore } from '../features/todos'; 7import { todosStore } from '../features/todos';
11import { todoActions } from '../features/todos/actions'; 8import { todoActions } from '../features/todos/actions';
12import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants'; 9import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants';
10import { workspaceActions } from '../features/workspaces/actions';
11import { workspaceStore } from '../features/workspaces/index';
12
13 13
14const { app, Menu, dialog } = remote; 14const { app, Menu, dialog } = remote;
15 15
@@ -811,22 +811,13 @@ export default class FranzMenu {
811 accelerator: 'CmdOrCtrl+Shift+L', 811 accelerator: 'CmdOrCtrl+Shift+L',
812 enabled: this.stores.user.isLoggedIn && this.stores.settings.app.lockingFeatureEnabled, 812 enabled: this.stores.user.isLoggedIn && this.stores.settings.app.lockingFeatureEnabled,
813 click() { 813 click() {
814 // Disable lock first - otherwise the application might not update correctly
815 actions.settings.update({ 814 actions.settings.update({
816 type: 'app', 815 type: 'app',
817 data: { 816 data: {
818 locked: false, 817 locked: true,
819 }, 818 },
820 }); 819 });
821 setTimeout(() => { 820 }
822 actions.settings.update({
823 type: 'app',
824 data: {
825 locked: true,
826 },
827 });
828 }, 0);
829 },
830 }); 821 });
831 822
832 if (serviceTpl.length > 0) { 823 if (serviceTpl.length > 0) {