From bd9fa0d0fb153db0ebccfaa39b8e06728ddc147b Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Wed, 2 Oct 2019 17:26:34 +0200 Subject: Clear confetti timeout on component unmount --- src/components/services/content/Services.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/components') diff --git a/src/components/services/content/Services.js b/src/components/services/content/Services.js index 73c27bfb6..b6291666b 100644 --- a/src/components/services/content/Services.js +++ b/src/components/services/content/Services.js @@ -56,16 +56,24 @@ export default @observer @injectSheet(styles) class Services extends Component { state = { showConfetti: true, - } + }; + + _confettiTimeout = null; componentDidMount() { - window.setTimeout(() => { + this._confettiTimeout = window.setTimeout(() => { this.setState({ showConfetti: false, }); }, ms('8s')); } + componentWillUnmount() { + if (this._confettiTimeout) { + clearTimeout(this._confettiTimeout); + } + } + render() { const { services, -- cgit v1.2.3-70-g09d2 From 17564073c2cfe29864d0763913eeaf4e0d0cf874 Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Wed, 2 Oct 2019 17:43:09 +0200 Subject: Add workaround for electron webview issue with disappearing cursors --- src/components/services/content/ServiceWebview.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/components') diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index 07bd17d9c..b3198d36a 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js @@ -20,6 +20,13 @@ class ServiceWebview extends Component { detachService({ service }); } + refocusWebview = () => { + const { webview } = this; + if (!webview) return; + webview.view.blur(); + webview.view.focus(); + }; + render() { const { service, @@ -28,7 +35,10 @@ class ServiceWebview extends Component { return ( { this.webview = webview; }} + ref={(webview) => { + this.webview = webview; + webview.view.addEventListener('did-stop-loading', this.refocusWebview); + }} autosize src={service.url} preload="./webview/recipe.js" -- cgit v1.2.3-70-g09d2 From 027e50d822737329cb95c2b1e3dbd487cf18332a Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Wed, 2 Oct 2019 21:51:35 +0200 Subject: fix(Basic Auth): Fix Basic Auth overlay background in Dark Mode --- packages/theme/src/themes/dark/index.ts | 1 + packages/theme/src/themes/default/index.ts | 1 + src/components/ui/Modal/styles.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components') diff --git a/packages/theme/src/themes/dark/index.ts b/packages/theme/src/themes/dark/index.ts index e94f54c55..67d0cfb71 100644 --- a/packages/theme/src/themes/dark/index.ts +++ b/packages/theme/src/themes/dark/index.ts @@ -66,6 +66,7 @@ export const selectSearchColor = inputBackground; // Modal export const colorModalOverlayBackground = color(legacyStyles.darkThemeBlack).alpha(0.8).rgb().string(); +export const colorModalBackground = colorContentBackground; // Services export const services = merge({}, defaultStyles.services, { diff --git a/packages/theme/src/themes/default/index.ts b/packages/theme/src/themes/default/index.ts index 4e042afce..057fde72f 100644 --- a/packages/theme/src/themes/default/index.ts +++ b/packages/theme/src/themes/default/index.ts @@ -145,6 +145,7 @@ export const badgeBorderRadius = 50; // Modal export const colorModalOverlayBackground = color('#000').alpha(0.5).rgb().string(); +export const colorModalBackground = colorContentBackground; // Services export const services = { diff --git a/src/components/ui/Modal/styles.js b/src/components/ui/Modal/styles.js index 49b970c97..c2bebf9bb 100644 --- a/src/components/ui/Modal/styles.js +++ b/src/components/ui/Modal/styles.js @@ -13,7 +13,7 @@ export default theme => ({ display: 'flex', }, modal: { - background: '#FFF', + background: theme.colorModalBackground, maxWidth: '90%', height: 'auto', margin: 'auto auto', -- cgit v1.2.3-70-g09d2 From e0cb89825af0cfe1dc78096eb055e61a15bc0860 Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Fri, 4 Oct 2019 13:54:46 +0200 Subject: Reference electron webview view more defensively --- src/components/services/content/ServiceWebview.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components') diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index b3198d36a..4bab4a964 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js @@ -37,7 +37,9 @@ class ServiceWebview extends Component { { this.webview = webview; - webview.view.addEventListener('did-stop-loading', this.refocusWebview); + if (webview && webview.view) { + webview.view.addEventListener('did-stop-loading', this.refocusWebview); + } }} autosize src={service.url} -- cgit v1.2.3-70-g09d2 From b7eb3e2a776a985a87bd857d6d33a9853faa55ce Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 4 Oct 2019 14:07:16 +0200 Subject: webControls polishing --- src/components/services/content/ServiceView.js | 3 +- src/features/webControls/constants.js | 1 + src/i18n/locales/defaultMessages.json | 261 +++++++++++++------------ src/i18n/locales/en-US.json | 3 +- src/i18n/messages/src/lib/Menu.json | 261 +++++++++++++------------ src/lib/Menu.js | 23 ++- 6 files changed, 300 insertions(+), 252 deletions(-) create mode 100644 src/features/webControls/constants.js (limited to 'src/components') diff --git a/src/components/services/content/ServiceView.js b/src/components/services/content/ServiceView.js index e8df58a1e..3b09518c5 100644 --- a/src/components/services/content/ServiceView.js +++ b/src/components/services/content/ServiceView.js @@ -13,6 +13,7 @@ import ServiceDisabled from './ServiceDisabled'; import ServiceRestricted from './ServiceRestricted'; import ServiceWebview from './ServiceWebview'; import WebControlsScreen from '../../../features/webControls/containers/WebControlsScreen'; +import { CUSTOM_WEBSITE_ID } from '../../../features/webControls/constants'; export default @observer class ServiceView extends Component { static propTypes = { @@ -139,7 +140,7 @@ export default @observer class ServiceView extends Component { /> ) : ( <> - {service.recipe.id === 'franz-custom-website' && ( + {service.recipe.id === CUSTOM_WEBSITE_ID && ( )} Franz Workspaces let you focus on what’s important right now. Set up different sets of services and easily switch between them at any time.

You decide which services you need when and where, so we can help you stay on top of your game - or easily switch off from work whenever you want.

", "workspaceDrawer.workspacesSettingsTooltip": "Edit workspaces settings", "workspaces.switchingIndicator.switchingTo": "Switching to" -} \ No newline at end of file +} diff --git a/src/i18n/messages/src/lib/Menu.json b/src/i18n/messages/src/lib/Menu.json index 26850c5b3..08c8da77d 100644 --- a/src/i18n/messages/src/lib/Menu.json +++ b/src/i18n/messages/src/lib/Menu.json @@ -4,11 +4,11 @@ "defaultMessage": "!!!Edit", "file": "src/lib/Menu.js", "start": { - "line": 17, + "line": 18, "column": 8 }, "end": { - "line": 20, + "line": 21, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!Undo", "file": "src/lib/Menu.js", "start": { - "line": 21, + "line": 22, "column": 8 }, "end": { - "line": 24, + "line": 25, "column": 3 } }, @@ -30,11 +30,11 @@ "defaultMessage": "!!!Redo", "file": "src/lib/Menu.js", "start": { - "line": 25, + "line": 26, "column": 8 }, "end": { - "line": 28, + "line": 29, "column": 3 } }, @@ -43,11 +43,11 @@ "defaultMessage": "!!!Cut", "file": "src/lib/Menu.js", "start": { - "line": 29, + "line": 30, "column": 7 }, "end": { - "line": 32, + "line": 33, "column": 3 } }, @@ -56,11 +56,11 @@ "defaultMessage": "!!!Copy", "file": "src/lib/Menu.js", "start": { - "line": 33, + "line": 34, "column": 8 }, "end": { - "line": 36, + "line": 37, "column": 3 } }, @@ -69,11 +69,11 @@ "defaultMessage": "!!!Paste", "file": "src/lib/Menu.js", "start": { - "line": 37, + "line": 38, "column": 9 }, "end": { - "line": 40, + "line": 41, "column": 3 } }, @@ -82,11 +82,11 @@ "defaultMessage": "!!!Paste And Match Style", "file": "src/lib/Menu.js", "start": { - "line": 41, + "line": 42, "column": 22 }, "end": { - "line": 44, + "line": 45, "column": 3 } }, @@ -95,11 +95,11 @@ "defaultMessage": "!!!Delete", "file": "src/lib/Menu.js", "start": { - "line": 45, + "line": 46, "column": 10 }, "end": { - "line": 48, + "line": 49, "column": 3 } }, @@ -108,11 +108,11 @@ "defaultMessage": "!!!Select All", "file": "src/lib/Menu.js", "start": { - "line": 49, + "line": 50, "column": 13 }, "end": { - "line": 52, + "line": 53, "column": 3 } }, @@ -121,11 +121,11 @@ "defaultMessage": "!!!Speech", "file": "src/lib/Menu.js", "start": { - "line": 53, + "line": 54, "column": 10 }, "end": { - "line": 56, + "line": 57, "column": 3 } }, @@ -134,11 +134,11 @@ "defaultMessage": "!!!Start Speaking", "file": "src/lib/Menu.js", "start": { - "line": 57, + "line": 58, "column": 17 }, "end": { - "line": 60, + "line": 61, "column": 3 } }, @@ -147,11 +147,11 @@ "defaultMessage": "!!!Stop Speaking", "file": "src/lib/Menu.js", "start": { - "line": 61, + "line": 62, "column": 16 }, "end": { - "line": 64, + "line": 65, "column": 3 } }, @@ -160,11 +160,11 @@ "defaultMessage": "!!!Start Dictation", "file": "src/lib/Menu.js", "start": { - "line": 65, + "line": 66, "column": 18 }, "end": { - "line": 68, + "line": 69, "column": 3 } }, @@ -173,11 +173,11 @@ "defaultMessage": "!!!Emoji & Symbols", "file": "src/lib/Menu.js", "start": { - "line": 69, + "line": 70, "column": 16 }, "end": { - "line": 72, + "line": 73, "column": 3 } }, @@ -186,11 +186,11 @@ "defaultMessage": "!!!Actual Size", "file": "src/lib/Menu.js", "start": { - "line": 73, + "line": 74, "column": 13 }, "end": { - "line": 76, + "line": 77, "column": 3 } }, @@ -199,11 +199,11 @@ "defaultMessage": "!!!Zoom In", "file": "src/lib/Menu.js", "start": { - "line": 77, + "line": 78, "column": 10 }, "end": { - "line": 80, + "line": 81, "column": 3 } }, @@ -212,11 +212,11 @@ "defaultMessage": "!!!Zoom Out", "file": "src/lib/Menu.js", "start": { - "line": 81, + "line": 82, "column": 11 }, "end": { - "line": 84, + "line": 85, "column": 3 } }, @@ -225,11 +225,11 @@ "defaultMessage": "!!!Enter Full Screen", "file": "src/lib/Menu.js", "start": { - "line": 85, + "line": 86, "column": 19 }, "end": { - "line": 88, + "line": 89, "column": 3 } }, @@ -238,11 +238,11 @@ "defaultMessage": "!!!Exit Full Screen", "file": "src/lib/Menu.js", "start": { - "line": 89, + "line": 90, "column": 18 }, "end": { - "line": 92, + "line": 93, "column": 3 } }, @@ -251,11 +251,11 @@ "defaultMessage": "!!!Toggle Full Screen", "file": "src/lib/Menu.js", "start": { - "line": 93, + "line": 94, "column": 20 }, "end": { - "line": 96, + "line": 97, "column": 3 } }, @@ -264,11 +264,11 @@ "defaultMessage": "!!!Toggle Developer Tools", "file": "src/lib/Menu.js", "start": { - "line": 97, + "line": 98, "column": 18 }, "end": { - "line": 100, + "line": 101, "column": 3 } }, @@ -277,11 +277,11 @@ "defaultMessage": "!!!Toggle Todos Developer Tools", "file": "src/lib/Menu.js", "start": { - "line": 101, + "line": 102, "column": 23 }, "end": { - "line": 104, + "line": 105, "column": 3 } }, @@ -290,11 +290,11 @@ "defaultMessage": "!!!Toggle Service Developer Tools", "file": "src/lib/Menu.js", "start": { - "line": 105, + "line": 106, "column": 25 }, "end": { - "line": 108, + "line": 109, "column": 3 } }, @@ -303,11 +303,11 @@ "defaultMessage": "!!!Reload Service", "file": "src/lib/Menu.js", "start": { - "line": 109, + "line": 110, "column": 17 }, "end": { - "line": 112, + "line": 113, "column": 3 } }, @@ -316,11 +316,11 @@ "defaultMessage": "!!!Reload Franz", "file": "src/lib/Menu.js", "start": { - "line": 113, + "line": 114, "column": 15 }, "end": { - "line": 116, + "line": 117, "column": 3 } }, @@ -329,11 +329,11 @@ "defaultMessage": "!!!Minimize", "file": "src/lib/Menu.js", "start": { - "line": 117, + "line": 118, "column": 12 }, "end": { - "line": 120, + "line": 121, "column": 3 } }, @@ -342,11 +342,11 @@ "defaultMessage": "!!!Close", "file": "src/lib/Menu.js", "start": { - "line": 121, + "line": 122, "column": 9 }, "end": { - "line": 124, + "line": 125, "column": 3 } }, @@ -355,11 +355,11 @@ "defaultMessage": "!!!Learn More", "file": "src/lib/Menu.js", "start": { - "line": 125, + "line": 126, "column": 13 }, "end": { - "line": 128, + "line": 129, "column": 3 } }, @@ -368,11 +368,11 @@ "defaultMessage": "!!!Changelog", "file": "src/lib/Menu.js", "start": { - "line": 129, + "line": 130, "column": 13 }, "end": { - "line": 132, + "line": 133, "column": 3 } }, @@ -381,11 +381,11 @@ "defaultMessage": "!!!Support", "file": "src/lib/Menu.js", "start": { - "line": 133, + "line": 134, "column": 11 }, "end": { - "line": 136, + "line": 137, "column": 3 } }, @@ -394,11 +394,11 @@ "defaultMessage": "!!!Copy Debug Information", "file": "src/lib/Menu.js", "start": { - "line": 137, + "line": 138, "column": 13 }, "end": { - "line": 140, + "line": 141, "column": 3 } }, @@ -407,11 +407,11 @@ "defaultMessage": "!!!Franz Debug Information", "file": "src/lib/Menu.js", "start": { - "line": 141, + "line": 142, "column": 27 }, "end": { - "line": 144, + "line": 145, "column": 3 } }, @@ -420,11 +420,11 @@ "defaultMessage": "!!!Your Debug Information has been copied to your clipboard.", "file": "src/lib/Menu.js", "start": { - "line": 145, + "line": 146, "column": 23 }, "end": { - "line": 148, + "line": 149, "column": 3 } }, @@ -433,11 +433,11 @@ "defaultMessage": "!!!Terms of Service", "file": "src/lib/Menu.js", "start": { - "line": 149, + "line": 150, "column": 7 }, "end": { - "line": 152, + "line": 153, "column": 3 } }, @@ -446,11 +446,11 @@ "defaultMessage": "!!!Privacy Statement", "file": "src/lib/Menu.js", "start": { - "line": 153, + "line": 154, "column": 11 }, "end": { - "line": 156, + "line": 157, "column": 3 } }, @@ -459,11 +459,11 @@ "defaultMessage": "!!!File", "file": "src/lib/Menu.js", "start": { - "line": 157, + "line": 158, "column": 8 }, "end": { - "line": 160, + "line": 161, "column": 3 } }, @@ -472,11 +472,11 @@ "defaultMessage": "!!!View", "file": "src/lib/Menu.js", "start": { - "line": 161, + "line": 162, "column": 8 }, "end": { - "line": 164, + "line": 165, "column": 3 } }, @@ -485,11 +485,11 @@ "defaultMessage": "!!!Services", "file": "src/lib/Menu.js", "start": { - "line": 165, + "line": 166, "column": 12 }, "end": { - "line": 168, + "line": 169, "column": 3 } }, @@ -498,11 +498,11 @@ "defaultMessage": "!!!Window", "file": "src/lib/Menu.js", "start": { - "line": 169, + "line": 170, "column": 10 }, "end": { - "line": 172, + "line": 173, "column": 3 } }, @@ -511,11 +511,11 @@ "defaultMessage": "!!!Help", "file": "src/lib/Menu.js", "start": { - "line": 173, + "line": 174, "column": 8 }, "end": { - "line": 176, + "line": 177, "column": 3 } }, @@ -524,11 +524,11 @@ "defaultMessage": "!!!About Franz", "file": "src/lib/Menu.js", "start": { - "line": 177, + "line": 178, "column": 9 }, "end": { - "line": 180, + "line": 181, "column": 3 } }, @@ -537,11 +537,11 @@ "defaultMessage": "!!!What's new?", "file": "src/lib/Menu.js", "start": { - "line": 181, + "line": 182, "column": 16 }, "end": { - "line": 184, + "line": 185, "column": 3 } }, @@ -550,11 +550,11 @@ "defaultMessage": "!!!Settings", "file": "src/lib/Menu.js", "start": { - "line": 185, + "line": 186, "column": 12 }, "end": { - "line": 188, + "line": 189, "column": 3 } }, @@ -563,11 +563,11 @@ "defaultMessage": "!!!Check for updates", "file": "src/lib/Menu.js", "start": { - "line": 189, + "line": 190, "column": 19 }, "end": { - "line": 192, + "line": 193, "column": 3 } }, @@ -576,11 +576,11 @@ "defaultMessage": "!!!Hide", "file": "src/lib/Menu.js", "start": { - "line": 193, + "line": 194, "column": 8 }, "end": { - "line": 196, + "line": 197, "column": 3 } }, @@ -589,11 +589,11 @@ "defaultMessage": "!!!Hide Others", "file": "src/lib/Menu.js", "start": { - "line": 197, + "line": 198, "column": 14 }, "end": { - "line": 200, + "line": 201, "column": 3 } }, @@ -602,11 +602,11 @@ "defaultMessage": "!!!Unhide", "file": "src/lib/Menu.js", "start": { - "line": 201, + "line": 202, "column": 10 }, "end": { - "line": 204, + "line": 205, "column": 3 } }, @@ -615,11 +615,11 @@ "defaultMessage": "!!!Quit", "file": "src/lib/Menu.js", "start": { - "line": 205, + "line": 206, "column": 8 }, "end": { - "line": 208, + "line": 209, "column": 3 } }, @@ -628,11 +628,11 @@ "defaultMessage": "!!!Add New Service...", "file": "src/lib/Menu.js", "start": { - "line": 209, + "line": 210, "column": 17 }, "end": { - "line": 212, + "line": 213, "column": 3 } }, @@ -641,11 +641,11 @@ "defaultMessage": "!!!Add New Workspace...", "file": "src/lib/Menu.js", "start": { - "line": 213, + "line": 214, "column": 19 }, "end": { - "line": 216, + "line": 217, "column": 3 } }, @@ -654,11 +654,11 @@ "defaultMessage": "!!!Open workspace drawer", "file": "src/lib/Menu.js", "start": { - "line": 217, + "line": 218, "column": 23 }, "end": { - "line": 220, + "line": 221, "column": 3 } }, @@ -667,11 +667,11 @@ "defaultMessage": "!!!Close workspace drawer", "file": "src/lib/Menu.js", "start": { - "line": 221, + "line": 222, "column": 24 }, "end": { - "line": 224, + "line": 225, "column": 3 } }, @@ -680,11 +680,11 @@ "defaultMessage": "!!!Activate next service...", "file": "src/lib/Menu.js", "start": { - "line": 225, + "line": 226, "column": 23 }, "end": { - "line": 228, + "line": 229, "column": 3 } }, @@ -693,11 +693,11 @@ "defaultMessage": "!!!Activate previous service...", "file": "src/lib/Menu.js", "start": { - "line": 229, + "line": 230, "column": 27 }, "end": { - "line": 232, + "line": 233, "column": 3 } }, @@ -706,11 +706,11 @@ "defaultMessage": "!!!Disable notifications & audio", "file": "src/lib/Menu.js", "start": { - "line": 233, + "line": 234, "column": 11 }, "end": { - "line": 236, + "line": 237, "column": 3 } }, @@ -719,11 +719,11 @@ "defaultMessage": "!!!Enable notifications & audio", "file": "src/lib/Menu.js", "start": { - "line": 237, + "line": 238, "column": 13 }, "end": { - "line": 240, + "line": 241, "column": 3 } }, @@ -732,11 +732,11 @@ "defaultMessage": "!!!Workspaces", "file": "src/lib/Menu.js", "start": { - "line": 241, + "line": 242, "column": 14 }, "end": { - "line": 244, + "line": 245, "column": 3 } }, @@ -745,11 +745,11 @@ "defaultMessage": "!!!Default", "file": "src/lib/Menu.js", "start": { - "line": 245, + "line": 246, "column": 20 }, "end": { - "line": 248, + "line": 249, "column": 3 } }, @@ -758,11 +758,11 @@ "defaultMessage": "!!!Todos", "file": "src/lib/Menu.js", "start": { - "line": 249, + "line": 250, "column": 9 }, "end": { - "line": 252, + "line": 253, "column": 3 } }, @@ -771,11 +771,11 @@ "defaultMessage": "!!!Open Todos drawer", "file": "src/lib/Menu.js", "start": { - "line": 253, + "line": 254, "column": 19 }, "end": { - "line": 256, + "line": 257, "column": 3 } }, @@ -784,11 +784,11 @@ "defaultMessage": "!!!Close Todos drawer", "file": "src/lib/Menu.js", "start": { - "line": 257, + "line": 258, "column": 20 }, "end": { - "line": 260, + "line": 261, "column": 3 } }, @@ -797,11 +797,24 @@ "defaultMessage": "!!!Enable Todos", "file": "src/lib/Menu.js", "start": { - "line": 261, + "line": 262, "column": 15 }, "end": { - "line": 264, + "line": 265, + "column": 3 + } + }, + { + "id": "menu.services.goHome", + "defaultMessage": "!!!Home", + "file": "src/lib/Menu.js", + "start": { + "line": 266, + "column": 17 + }, + "end": { + "line": 269, "column": 3 } } 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'; import { announcementsStore } from '../features/announcements'; import { GA_CATEGORY_TODOS, todosStore } from '../features/todos'; import { todoActions } from '../features/todos/actions'; +import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants'; const { app, Menu, dialog } = remote; @@ -262,6 +263,10 @@ const menuItems = defineMessages({ id: 'menu.todos.enableTodos', defaultMessage: '!!!Enable Todos', }, + serviceGoHome: { + id: 'menu.services.goHome', + defaultMessage: '!!!Home', + }, }); function getActiveWebview() { @@ -672,8 +677,12 @@ export default class FranzMenu { accelerator: `${cmdKey}+R`, click: () => { if (this.stores.user.isLoggedIn - && this.stores.services.enabled.length > 0) { - this.actions.service.reloadActive(); + && this.stores.services.enabled.length > 0) { + if (this.stores.services.active.recipe.id === CUSTOM_WEBSITE_ID) { + this.stores.services.active.webview.reload(); + } else { + this.actions.service.reloadActive(); + } } else { window.location.reload(); } @@ -877,6 +886,16 @@ export default class FranzMenu { }, }))); + if (services.active && services.active.recipe.id === CUSTOM_WEBSITE_ID) { + menu.push({ + type: 'separator', + }, { + label: intl.formatMessage(menuItems.serviceGoHome), + accelerator: `${cmdKey}+shift+H`, + click: () => this.actions.service.reloadActive(), + }); + } + return menu; } -- cgit v1.2.3-70-g09d2 From 3495a54951822e2a944e8dec852d0c728e362ab3 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 4 Oct 2019 19:49:46 +0200 Subject: Revert "fix(Workspaces): Only initialize active Workspace services when app is starting" This reverts commit b521a232ac7c79527d0f3c9baa46695fa5d5e62d, reversing changes made to 5668a7ad1276a5117bba912a883442961ac54728. --- src/components/services/content/ServiceWebview.js | 4 +--- src/features/workspaces/store.js | 12 ++---------- 2 files changed, 3 insertions(+), 13 deletions(-) (limited to 'src/components') diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index 4bab4a964..b3198d36a 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js @@ -37,9 +37,7 @@ class ServiceWebview extends Component { { this.webview = webview; - if (webview && webview.view) { - webview.view.addEventListener('did-stop-loading', this.refocusWebview); - } + webview.view.addEventListener('did-stop-loading', this.refocusWebview); }} autosize src={service.url} diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js index f08323e6c..7f41cfc88 100644 --- a/src/features/workspaces/store.js +++ b/src/features/workspaces/store.js @@ -141,16 +141,8 @@ export default class WorkspacesStore extends FeatureStore { filterServicesByActiveWorkspace = (services) => { const { activeWorkspace, isFeatureActive } = this; - if (isFeatureActive) { - if (activeWorkspace) { - return this.getWorkspaceServices(activeWorkspace); - } - // There is no active workspace yet but we might be still loading them - if (!getUserWorkspacesRequest.wasExecuted || getUserWorkspacesRequest.isExecutingFirstTime) { - // If so, do not show any services to avoid loading all of them unfiltered - // and then having the filter flashing in (which is ugly and slow). - return []; - } + if (isFeatureActive && activeWorkspace) { + return this.getWorkspaceServices(activeWorkspace); } return services; }; -- cgit v1.2.3-70-g09d2 From 44c4626e75b6271be4e672a2905693da7bad7397 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 4 Oct 2019 21:52:27 +0200 Subject: fix adding event listener when webview.view does not exist --- src/components/services/content/ServiceWebview.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components') diff --git a/src/components/services/content/ServiceWebview.js b/src/components/services/content/ServiceWebview.js index b3198d36a..4bab4a964 100644 --- a/src/components/services/content/ServiceWebview.js +++ b/src/components/services/content/ServiceWebview.js @@ -37,7 +37,9 @@ class ServiceWebview extends Component { { this.webview = webview; - webview.view.addEventListener('did-stop-loading', this.refocusWebview); + if (webview && webview.view) { + webview.view.addEventListener('did-stop-loading', this.refocusWebview); + } }} autosize src={service.url} -- cgit v1.2.3-70-g09d2