diff options
Diffstat (limited to 'src/components/layout/AppLayout.js')
-rw-r--r-- | src/components/layout/AppLayout.js | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 200777ae6..ed004d07e 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -6,7 +6,6 @@ import { TitleBar } from 'electron-react-titlebar'; | |||
6 | import injectSheet from 'react-jss'; | 6 | import injectSheet from 'react-jss'; |
7 | 7 | ||
8 | import InfoBar from '../ui/InfoBar'; | 8 | import InfoBar from '../ui/InfoBar'; |
9 | import { Component as DelayApp } from '../../features/delayApp'; | ||
10 | import { Component as BasicAuth } from '../../features/basicAuth'; | 9 | import { Component as BasicAuth } from '../../features/basicAuth'; |
11 | import { Component as ShareFranz } from '../../features/shareFranz'; | 10 | import { Component as ShareFranz } from '../../features/shareFranz'; |
12 | import ErrorBoundary from '../util/ErrorBoundary'; | 11 | import ErrorBoundary from '../util/ErrorBoundary'; |
@@ -37,6 +36,10 @@ const messages = defineMessages({ | |||
37 | id: 'infobar.requiredRequestsFailed', | 36 | id: 'infobar.requiredRequestsFailed', |
38 | defaultMessage: '!!!Could not load services and user information', | 37 | defaultMessage: '!!!Could not load services and user information', |
39 | }, | 38 | }, |
39 | authRequestFailed: { | ||
40 | id: 'infobar.authRequestFailed', | ||
41 | defaultMessage: '!!!There were errors while trying to perform an authenticated request. Please try logging out and back in if this error persists.', | ||
42 | }, | ||
40 | }); | 43 | }); |
41 | 44 | ||
42 | const styles = theme => ({ | 45 | const styles = theme => ({ |
@@ -63,6 +66,7 @@ class AppLayout extends Component { | |||
63 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, | 66 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, |
64 | appUpdateIsDownloaded: PropTypes.bool.isRequired, | 67 | appUpdateIsDownloaded: PropTypes.bool.isRequired, |
65 | nextAppReleaseVersion: PropTypes.string, | 68 | nextAppReleaseVersion: PropTypes.string, |
69 | authRequestFailed: PropTypes.bool.isRequired, | ||
66 | removeNewsItem: PropTypes.func.isRequired, | 70 | removeNewsItem: PropTypes.func.isRequired, |
67 | reloadServicesAfterUpdate: PropTypes.func.isRequired, | 71 | reloadServicesAfterUpdate: PropTypes.func.isRequired, |
68 | installAppUpdate: PropTypes.func.isRequired, | 72 | installAppUpdate: PropTypes.func.isRequired, |
@@ -95,6 +99,7 @@ class AppLayout extends Component { | |||
95 | showServicesUpdatedInfoBar, | 99 | showServicesUpdatedInfoBar, |
96 | appUpdateIsDownloaded, | 100 | appUpdateIsDownloaded, |
97 | nextAppReleaseVersion, | 101 | nextAppReleaseVersion, |
102 | authRequestFailed, | ||
98 | removeNewsItem, | 103 | removeNewsItem, |
99 | reloadServicesAfterUpdate, | 104 | reloadServicesAfterUpdate, |
100 | installAppUpdate, | 105 | installAppUpdate, |
@@ -111,7 +116,7 @@ class AppLayout extends Component { | |||
111 | return ( | 116 | return ( |
112 | <ErrorBoundary> | 117 | <ErrorBoundary> |
113 | <div className="app"> | 118 | <div className="app"> |
114 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon="assets/images/logo.svg" />} | 119 | {isWindows && !isFullScreen && <TitleBar menu={window.ferdi.menu.template} icon="assets/images/logo.svg" />} |
115 | <div className={`app__content ${classes.appContent}`}> | 120 | <div className={`app__content ${classes.appContent}`}> |
116 | {workspacesDrawer} | 121 | {workspacesDrawer} |
117 | {sidebar} | 122 | {sidebar} |
@@ -151,6 +156,18 @@ class AppLayout extends Component { | |||
151 | {intl.formatMessage(messages.requiredRequestsFailed)} | 156 | {intl.formatMessage(messages.requiredRequestsFailed)} |
152 | </InfoBar> | 157 | </InfoBar> |
153 | )} | 158 | )} |
159 | {authRequestFailed && ( | ||
160 | <InfoBar | ||
161 | type="danger" | ||
162 | ctaLabel="Try again" | ||
163 | ctaLoading={areRequiredRequestsLoading} | ||
164 | sticky | ||
165 | onClick={retryRequiredRequests} | ||
166 | > | ||
167 | <span className="mdi mdi-flash" /> | ||
168 | {intl.formatMessage(messages.authRequestFailed)} | ||
169 | </InfoBar> | ||
170 | )} | ||
154 | {showServicesUpdatedInfoBar && ( | 171 | {showServicesUpdatedInfoBar && ( |
155 | <InfoBar | 172 | <InfoBar |
156 | type="primary" | 173 | type="primary" |
@@ -168,7 +185,6 @@ class AppLayout extends Component { | |||
168 | onInstallUpdate={installAppUpdate} | 185 | onInstallUpdate={installAppUpdate} |
169 | /> | 186 | /> |
170 | )} | 187 | )} |
171 | {isDelayAppScreenVisible && (<DelayApp />)} | ||
172 | <BasicAuth /> | 188 | <BasicAuth /> |
173 | <ShareFranz /> | 189 | <ShareFranz /> |
174 | {services} | 190 | {services} |