aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Menu.js
diff options
context:
space:
mode:
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 32bd1644b..cda33baef 100644
--- a/src/lib/Menu.js
+++ b/src/lib/Menu.js
@@ -10,6 +10,7 @@ import { announcementActions } from '../features/announcements/actions';
10import { announcementsStore } from '../features/announcements'; 10import { announcementsStore } from '../features/announcements';
11import { GA_CATEGORY_TODOS, todosStore } from '../features/todos'; 11import { GA_CATEGORY_TODOS, todosStore } from '../features/todos';
12import { todoActions } from '../features/todos/actions'; 12import { todoActions } from '../features/todos/actions';
13import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants';
13 14
14const { app, Menu, dialog } = remote; 15const { app, Menu, dialog } = remote;
15 16
@@ -262,6 +263,10 @@ const menuItems = defineMessages({
262 id: 'menu.todos.enableTodos', 263 id: 'menu.todos.enableTodos',
263 defaultMessage: '!!!Enable Todos', 264 defaultMessage: '!!!Enable Todos',
264 }, 265 },
266 serviceGoHome: {
267 id: 'menu.services.goHome',
268 defaultMessage: '!!!Home',
269 },
265}); 270});
266 271
267function getActiveWebview() { 272function getActiveWebview() {
@@ -672,8 +677,12 @@ export default class FranzMenu {
672 accelerator: `${cmdKey}+R`, 677 accelerator: `${cmdKey}+R`,
673 click: () => { 678 click: () => {
674 if (this.stores.user.isLoggedIn 679 if (this.stores.user.isLoggedIn
675 && this.stores.services.enabled.length > 0) { 680 && this.stores.services.enabled.length > 0) {
676 this.actions.service.reloadActive(); 681 if (this.stores.services.active.recipe.id === CUSTOM_WEBSITE_ID) {
682 this.stores.services.active.webview.reload();
683 } else {
684 this.actions.service.reloadActive();
685 }
677 } else { 686 } else {
678 window.location.reload(); 687 window.location.reload();
679 } 688 }
@@ -877,6 +886,16 @@ export default class FranzMenu {
877 }, 886 },
878 }))); 887 })));
879 888
889 if (services.active && services.active.recipe.id === CUSTOM_WEBSITE_ID) {
890 menu.push({
891 type: 'separator',
892 }, {
893 label: intl.formatMessage(menuItems.serviceGoHome),
894 accelerator: `${cmdKey}+shift+H`,
895 click: () => this.actions.service.reloadActive(),
896 });
897 }
898
880 return menu; 899 return menu;
881 } 900 }
882 901