aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Menu.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2019-10-09 09:48:41 +0200
committerLibravatar vantezzen <hello@vantezzen.io>2019-10-09 09:48:41 +0200
commitda9e8a3d5b11efcc8eeee325c0ac7eb7840f75af (patch)
treea189f4566c6380b86aeb04b9307aea23fc6e14d7 /src/lib/Menu.js
parentUpdate zh-HANT.json (diff)
parentUpdate CHANGELOG.md (diff)
downloadferdium-app-da9e8a3d5b11efcc8eeee325c0ac7eb7840f75af.tar.gz
ferdium-app-da9e8a3d5b11efcc8eeee325c0ac7eb7840f75af.tar.zst
ferdium-app-da9e8a3d5b11efcc8eeee325c0ac7eb7840f75af.zip
Merge branch 'master' of https://github.com/meetfranz/franz into franz-5.4.0
Diffstat (limited to 'src/lib/Menu.js')
-rw-r--r--src/lib/Menu.js23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js
index 01aee6f5c..f223283f9 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -9,6 +9,7 @@ import { announcementActions } from '../features/announcements/actions';
9import { announcementsStore } from '../features/announcements'; 9import { announcementsStore } from '../features/announcements';
10import { todosStore } from '../features/todos'; 10import { todosStore } from '../features/todos';
11import { todoActions } from '../features/todos/actions'; 11import { todoActions } from '../features/todos/actions';
12import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants';
12 13
13const { app, Menu, dialog } = remote; 14const { app, Menu, dialog } = remote;
14 15
@@ -281,6 +282,10 @@ const menuItems = defineMessages({
281 id: 'menu.todos.enableTodos', 282 id: 'menu.todos.enableTodos',
282 defaultMessage: '!!!Enable Todos', 283 defaultMessage: '!!!Enable Todos',
283 }, 284 },
285 serviceGoHome: {
286 id: 'menu.services.goHome',
287 defaultMessage: '!!!Home',
288 },
284}); 289});
285 290
286function getActiveWebview() { 291function getActiveWebview() {
@@ -767,8 +772,12 @@ export default class FranzMenu {
767 accelerator: `${cmdKey}+R`, 772 accelerator: `${cmdKey}+R`,
768 click: () => { 773 click: () => {
769 if (this.stores.user.isLoggedIn 774 if (this.stores.user.isLoggedIn
770 && this.stores.services.enabled.length > 0) { 775 && this.stores.services.enabled.length > 0) {
771 this.actions.service.reloadActive(); 776 if (this.stores.services.active.recipe.id === CUSTOM_WEBSITE_ID) {
777 this.stores.services.active.webview.reload();
778 } else {
779 this.actions.service.reloadActive();
780 }
772 } else { 781 } else {
773 window.location.reload(); 782 window.location.reload();
774 } 783 }
@@ -995,6 +1004,16 @@ export default class FranzMenu {
995 }, 1004 },
996 }))); 1005 })));
997 1006
1007 if (services.active && services.active.recipe.id === CUSTOM_WEBSITE_ID) {
1008 menu.push({
1009 type: 'separator',
1010 }, {
1011 label: intl.formatMessage(menuItems.serviceGoHome),
1012 accelerator: `${cmdKey}+shift+H`,
1013 click: () => this.actions.service.reloadActive(),
1014 });
1015 }
1016
998 return menu; 1017 return menu;
999 } 1018 }
1000 1019