diff options
author | Stefan Malzner <stefan@adlk.io> | 2019-02-03 21:03:01 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2019-02-03 21:03:01 +0100 |
commit | ebb9735c84a19de5a37e983480b3295865d21128 (patch) | |
tree | 24754321e3cb38721ffce2db5af86d849067f7d2 | |
parent | Merge branch 'develop' (diff) | |
parent | fix(Service): Improve focus when switching services (diff) | |
download | ferdium-app-ebb9735c84a19de5a37e983480b3295865d21128.tar.gz ferdium-app-ebb9735c84a19de5a37e983480b3295865d21128.tar.zst ferdium-app-ebb9735c84a19de5a37e983480b3295865d21128.zip |
Merge branch 'develop'
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/components/layout/AppLayout.js | 11 | ||||
-rw-r--r-- | src/stores/ServicesStore.js | 5 | ||||
-rw-r--r-- | src/styles/services.scss | 10 | ||||
-rw-r--r-- | src/webview/recipe.js | 2 |
5 files changed, 15 insertions, 15 deletions
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | # Franz 5 (beta) | 6 | # Franz 5 (beta) |
7 | [![Build status Windows](https://ci.appveyor.com/api/projects/status/9yman4ye19x4274o/branch/master?svg=true)](https://ci.appveyor.com/project/adlk/franz/branch/master) | 7 | [![Build status Windows](https://ci.appveyor.com/api/projects/status/9yman4ye19x4274o/branch/master?svg=true)](https://ci.appveyor.com/project/adlk/franz/branch/master) |
8 | [![Build Status Mac](https://travis-ci.org/meetfranz/franz.svg?branch=master)](https://travis-ci.org/meetfranz/franz) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://meetfranz.com/payment.html) | 8 | [![Build Status Mac & Linux](https://travis-ci.com/meetfranz/franz.svg?branch=master)](https://travis-ci.com/meetfranz/franz) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://meetfranz.com/payment.html) |
9 | 9 | ||
10 | Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more. | 10 | Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more. |
11 | 11 | ||
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 28eaa7fdc..bce792e56 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -9,7 +9,7 @@ import { Component as DelayApp } from '../../features/delayApp'; | |||
9 | import { Component as BasicAuth } from '../../features/basicAuth'; | 9 | import { Component as BasicAuth } from '../../features/basicAuth'; |
10 | import ErrorBoundary from '../util/ErrorBoundary'; | 10 | import ErrorBoundary from '../util/ErrorBoundary'; |
11 | 11 | ||
12 | import globalMessages from '../../i18n/globalMessages'; | 12 | // import globalMessages from '../../i18n/globalMessages'; |
13 | 13 | ||
14 | import { isWindows } from '../../environment'; | 14 | import { isWindows } from '../../environment'; |
15 | 15 | ||
@@ -51,7 +51,7 @@ export default @observer class AppLayout extends Component { | |||
51 | services: PropTypes.element.isRequired, | 51 | services: PropTypes.element.isRequired, |
52 | children: PropTypes.element, | 52 | children: PropTypes.element, |
53 | news: MobxPropTypes.arrayOrObservableArray.isRequired, | 53 | news: MobxPropTypes.arrayOrObservableArray.isRequired, |
54 | isOnline: PropTypes.bool.isRequired, | 54 | // isOnline: PropTypes.bool.isRequired, |
55 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, | 55 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, |
56 | appUpdateIsDownloaded: PropTypes.bool.isRequired, | 56 | appUpdateIsDownloaded: PropTypes.bool.isRequired, |
57 | removeNewsItem: PropTypes.func.isRequired, | 57 | removeNewsItem: PropTypes.func.isRequired, |
@@ -79,7 +79,7 @@ export default @observer class AppLayout extends Component { | |||
79 | sidebar, | 79 | sidebar, |
80 | services, | 80 | services, |
81 | children, | 81 | children, |
82 | isOnline, | 82 | // isOnline, |
83 | news, | 83 | news, |
84 | showServicesUpdatedInfoBar, | 84 | showServicesUpdatedInfoBar, |
85 | appUpdateIsDownloaded, | 85 | appUpdateIsDownloaded, |
@@ -115,14 +115,15 @@ export default @observer class AppLayout extends Component { | |||
115 | <span dangerouslySetInnerHTML={createMarkup(item.message)} /> | 115 | <span dangerouslySetInnerHTML={createMarkup(item.message)} /> |
116 | </InfoBar> | 116 | </InfoBar> |
117 | ))} | 117 | ))} |
118 | {!isOnline && ( | 118 | {/* {!isOnline && ( |
119 | <InfoBar | 119 | <InfoBar |
120 | type="danger" | 120 | type="danger" |
121 | sticky | ||
121 | > | 122 | > |
122 | <span className="mdi mdi-flash" /> | 123 | <span className="mdi mdi-flash" /> |
123 | {intl.formatMessage(globalMessages.notConnectedToTheInternet)} | 124 | {intl.formatMessage(globalMessages.notConnectedToTheInternet)} |
124 | </InfoBar> | 125 | </InfoBar> |
125 | )} | 126 | )} */} |
126 | {!areRequiredRequestsSuccessful && showRequiredRequestsError && ( | 127 | {!areRequiredRequestsSuccessful && showRequiredRequestsError && ( |
127 | <InfoBar | 128 | <InfoBar |
128 | type="danger" | 129 | type="danger" |
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index f79197c38..efd57a09d 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -292,6 +292,8 @@ export default class ServicesStore extends Store { | |||
292 | this.all[index].isActive = false; | 292 | this.all[index].isActive = false; |
293 | }); | 293 | }); |
294 | service.isActive = true; | 294 | service.isActive = true; |
295 | |||
296 | this._focusActiveService(); | ||
295 | } | 297 | } |
296 | 298 | ||
297 | @action _setActiveNext() { | 299 | @action _setActiveNext() { |
@@ -342,6 +344,9 @@ export default class ServicesStore extends Store { | |||
342 | const service = this.one(serviceId); | 344 | const service = this.one(serviceId); |
343 | 345 | ||
344 | if (service.webview) { | 346 | if (service.webview) { |
347 | if (document.activeElement) { | ||
348 | document.activeElement.blur(); | ||
349 | } | ||
345 | service.webview.focus(); | 350 | service.webview.focus(); |
346 | } | 351 | } |
347 | } | 352 | } |
diff --git a/src/styles/services.scss b/src/styles/services.scss index 0e559501c..5acf92d2c 100644 --- a/src/styles/services.scss +++ b/src/styles/services.scss | |||
@@ -39,18 +39,12 @@ | |||
39 | webview { | 39 | webview { |
40 | background: $theme-gray-lighter; | 40 | background: $theme-gray-lighter; |
41 | display: inline-flex; | 41 | display: inline-flex; |
42 | height: 0; | 42 | height: 100%; |
43 | width: 0; | 43 | width: 100%; |
44 | } | 44 | } |
45 | 45 | ||
46 | &.is-active { | 46 | &.is-active { |
47 | z-index: 100; | 47 | z-index: 100; |
48 | |||
49 | webview { | ||
50 | flex: 0 1; | ||
51 | height: 100%; | ||
52 | width: 100%; | ||
53 | } | ||
54 | } | 48 | } |
55 | 49 | ||
56 | &--force-repaint webview { z-index: 5; } | 50 | &--force-repaint webview { z-index: 5; } |
diff --git a/src/webview/recipe.js b/src/webview/recipe.js index 9aa89ce01..c718b348e 100644 --- a/src/webview/recipe.js +++ b/src/webview/recipe.js | |||
@@ -73,7 +73,7 @@ class RecipeController { | |||
73 | require(modulePath)(new RecipeWebview(), {...config, recipe,}); | 73 | require(modulePath)(new RecipeWebview(), {...config, recipe,}); |
74 | debug('Initialize Recipe', config, recipe); | 74 | debug('Initialize Recipe', config, recipe); |
75 | 75 | ||
76 | this.settings.service = config; | 76 | this.settings.service = Object.assign(config, { recipe }); |
77 | } catch (err) { | 77 | } catch (err) { |
78 | console.error('Recipe initialization failed', err); | 78 | console.error('Recipe initialization failed', err); |
79 | } | 79 | } |