diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-12-02 15:08:07 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-12-02 15:08:07 +0100 |
commit | a5aa5e1380a0847eb33be3315d164fb9e0e23255 (patch) | |
tree | a1ea4b0f635cabb54d9cf028809d2f079727b9a1 /src/containers/auth/AuthLayoutContainer.js | |
parent | Add instruction to install Franz with homebrew (#1134) (diff) | |
parent | Merge branch 'develop' into release/5.0.0-beta.19 (diff) | |
download | ferdium-app-a5aa5e1380a0847eb33be3315d164fb9e0e23255.tar.gz ferdium-app-a5aa5e1380a0847eb33be3315d164fb9e0e23255.tar.zst ferdium-app-a5aa5e1380a0847eb33be3315d164fb9e0e23255.zip |
Merge branch 'release/5.0.0-beta.19'
Diffstat (limited to 'src/containers/auth/AuthLayoutContainer.js')
-rw-r--r-- | src/containers/auth/AuthLayoutContainer.js | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/containers/auth/AuthLayoutContainer.js b/src/containers/auth/AuthLayoutContainer.js index 004054fdd..b73598f3d 100644 --- a/src/containers/auth/AuthLayoutContainer.js +++ b/src/containers/auth/AuthLayoutContainer.js | |||
@@ -5,11 +5,11 @@ import { inject, observer } from 'mobx-react'; | |||
5 | import AuthLayout from '../../components/auth/AuthLayout'; | 5 | import AuthLayout from '../../components/auth/AuthLayout'; |
6 | import AppStore from '../../stores/AppStore'; | 6 | import AppStore from '../../stores/AppStore'; |
7 | import GlobalErrorStore from '../../stores/GlobalErrorStore'; | 7 | import GlobalErrorStore from '../../stores/GlobalErrorStore'; |
8 | import AppLoader from '../../components/ui/AppLoader'; | ||
8 | 9 | ||
9 | import { oneOrManyChildElements } from '../../prop-types'; | 10 | import { oneOrManyChildElements } from '../../prop-types'; |
10 | 11 | ||
11 | @inject('stores', 'actions') @observer | 12 | export default @inject('stores', 'actions') @observer class AuthLayoutContainer extends Component { |
12 | export default class AuthLayoutContainer extends Component { | ||
13 | static propTypes = { | 13 | static propTypes = { |
14 | children: oneOrManyChildElements.isRequired, | 14 | children: oneOrManyChildElements.isRequired, |
15 | location: PropTypes.shape({ | 15 | location: PropTypes.shape({ |
@@ -19,14 +19,27 @@ export default class AuthLayoutContainer extends Component { | |||
19 | 19 | ||
20 | render() { | 20 | render() { |
21 | const { stores, actions, children, location } = this.props; | 21 | const { stores, actions, children, location } = this.props; |
22 | const { app, features, globalError } = stores; | ||
23 | |||
24 | const isLoadingBaseFeatures = features.defaultFeaturesRequest.isExecuting | ||
25 | && !features.defaultFeaturesRequest.wasExecuted; | ||
26 | |||
27 | if (isLoadingBaseFeatures) { | ||
28 | return ( | ||
29 | <AppLoader /> | ||
30 | ); | ||
31 | } | ||
32 | |||
22 | return ( | 33 | return ( |
23 | <AuthLayout | 34 | <AuthLayout |
24 | error={stores.globalError.response} | 35 | error={globalError.response} |
25 | pathname={location.pathname} | 36 | pathname={location.pathname} |
26 | isOnline={stores.app.isOnline} | 37 | isOnline={app.isOnline} |
27 | isAPIHealthy={!stores.app.healthCheckRequest.isError} | 38 | isAPIHealthy={!app.healthCheckRequest.isError} |
28 | retryHealthCheck={actions.app.healthCheck} | 39 | retryHealthCheck={actions.app.healthCheck} |
29 | isHealthCheckLoading={stores.app.healthCheckRequest.isExecuting} | 40 | isHealthCheckLoading={app.healthCheckRequest.isExecuting} |
41 | isFullScreen={app.isFullScreen} | ||
42 | darkMode={app.isSystemDarkModeEnabled} | ||
30 | > | 43 | > |
31 | {children} | 44 | {children} |
32 | </AuthLayout> | 45 | </AuthLayout> |