diff options
author | 2019-10-04 14:07:16 +0200 | |
---|---|---|
committer | 2019-10-04 14:07:16 +0200 | |
commit | b7eb3e2a776a985a87bd857d6d33a9853faa55ce (patch) | |
tree | a112663b7ef48cdff525c902804a5dc75ace2300 /src/lib | |
parent | Update tooltip position (diff) | |
download | ferdium-app-b7eb3e2a776a985a87bd857d6d33a9853faa55ce.tar.gz ferdium-app-b7eb3e2a776a985a87bd857d6d33a9853faa55ce.tar.zst ferdium-app-b7eb3e2a776a985a87bd857d6d33a9853faa55ce.zip |
webControls polishing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Menu.js | 23 |
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'; | |||
10 | import { announcementsStore } from '../features/announcements'; | 10 | import { announcementsStore } from '../features/announcements'; |
11 | import { GA_CATEGORY_TODOS, todosStore } from '../features/todos'; | 11 | import { GA_CATEGORY_TODOS, todosStore } from '../features/todos'; |
12 | import { todoActions } from '../features/todos/actions'; | 12 | import { todoActions } from '../features/todos/actions'; |
13 | import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants'; | ||
13 | 14 | ||
14 | const { app, Menu, dialog } = remote; | 15 | const { 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 | ||
267 | function getActiveWebview() { | 272 | function 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 | ||