diff options
author | vantezzen <hello@vantezzen.io> | 2019-10-20 20:08:57 +0200 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2019-10-20 20:08:57 +0200 |
commit | 7e332dc4b7a5fe0c275a8d802752d7ba5dc3d4ec (patch) | |
tree | 7066e41d4163102292785aec4029ed4c2f98b596 /src/containers/auth/AuthLayoutContainer.js | |
parent | Fix #139 (diff) | |
download | ferdium-app-7e332dc4b7a5fe0c275a8d802752d7ba5dc3d4ec.tar.gz ferdium-app-7e332dc4b7a5fe0c275a8d802752d7ba5dc3d4ec.tar.zst ferdium-app-7e332dc4b7a5fe0c275a8d802752d7ba5dc3d4ec.zip |
Improve switch between accounts and servers
Diffstat (limited to 'src/containers/auth/AuthLayoutContainer.js')
-rw-r--r-- | src/containers/auth/AuthLayoutContainer.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/containers/auth/AuthLayoutContainer.js b/src/containers/auth/AuthLayoutContainer.js index 427054d3d..883a6ea60 100644 --- a/src/containers/auth/AuthLayoutContainer.js +++ b/src/containers/auth/AuthLayoutContainer.js | |||
@@ -5,6 +5,7 @@ import { ThemeProvider } from 'react-jss'; | |||
5 | 5 | ||
6 | import AuthLayout from '../../components/auth/AuthLayout'; | 6 | import AuthLayout from '../../components/auth/AuthLayout'; |
7 | import AppStore from '../../stores/AppStore'; | 7 | import AppStore from '../../stores/AppStore'; |
8 | import UserStore from '../../stores/UserStore'; | ||
8 | import GlobalErrorStore from '../../stores/GlobalErrorStore'; | 9 | import GlobalErrorStore from '../../stores/GlobalErrorStore'; |
9 | import AppLoader from '../../components/ui/AppLoader'; | 10 | import AppLoader from '../../components/ui/AppLoader'; |
10 | 11 | ||
@@ -23,7 +24,7 @@ export default @inject('stores', 'actions') @observer class AuthLayoutContainer | |||
23 | stores, actions, children, location, | 24 | stores, actions, children, location, |
24 | } = this.props; | 25 | } = this.props; |
25 | const { | 26 | const { |
26 | app, features, globalError, | 27 | app, features, globalError, user, |
27 | } = stores; | 28 | } = stores; |
28 | 29 | ||
29 | const isLoadingBaseFeatures = features.defaultFeaturesRequest.isExecuting | 30 | const isLoadingBaseFeatures = features.defaultFeaturesRequest.isExecuting |
@@ -37,6 +38,15 @@ export default @inject('stores', 'actions') @observer class AuthLayoutContainer | |||
37 | ); | 38 | ); |
38 | } | 39 | } |
39 | 40 | ||
41 | const { isLoggingOut } = user; | ||
42 | if (isLoggingOut) { | ||
43 | return ( | ||
44 | <ThemeProvider theme={stores.ui.theme}> | ||
45 | <AppLoader texts={['Logging you out...']} /> | ||
46 | </ThemeProvider> | ||
47 | ); | ||
48 | } | ||
49 | |||
40 | return ( | 50 | return ( |
41 | <ThemeProvider theme={stores.ui.theme}> | 51 | <ThemeProvider theme={stores.ui.theme}> |
42 | <AuthLayout | 52 | <AuthLayout |
@@ -62,6 +72,7 @@ AuthLayoutContainer.wrappedComponent.propTypes = { | |||
62 | stores: PropTypes.shape({ | 72 | stores: PropTypes.shape({ |
63 | app: PropTypes.instanceOf(AppStore).isRequired, | 73 | app: PropTypes.instanceOf(AppStore).isRequired, |
64 | globalError: PropTypes.instanceOf(GlobalErrorStore).isRequired, | 74 | globalError: PropTypes.instanceOf(GlobalErrorStore).isRequired, |
75 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
65 | }).isRequired, | 76 | }).isRequired, |
66 | actions: PropTypes.shape({ | 77 | actions: PropTypes.shape({ |
67 | app: PropTypes.shape({ | 78 | app: PropTypes.shape({ |