aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/components/layout/AppLayout.js14
-rw-r--r--src/containers/layout/AppLayoutContainer.js1
-rw-r--r--src/stores/AppStore.js2
-rw-r--r--src/stores/GlobalErrorStore.js5
-rw-r--r--src/stores/NewsStore.js4
-rw-r--r--src/styles/auth.scss2
-rw-r--r--src/styles/colors.scss1
-rw-r--r--src/theme/default/legacy.js2
8 files changed, 25 insertions, 6 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js
index 0aeee6781..02550c87f 100644
--- a/src/components/layout/AppLayout.js
+++ b/src/components/layout/AppLayout.js
@@ -60,6 +60,7 @@ class AppLayout extends Component {
60 showServicesUpdatedInfoBar: PropTypes.bool.isRequired, 60 showServicesUpdatedInfoBar: PropTypes.bool.isRequired,
61 appUpdateIsDownloaded: PropTypes.bool.isRequired, 61 appUpdateIsDownloaded: PropTypes.bool.isRequired,
62 nextAppReleaseVersion: PropTypes.string, 62 nextAppReleaseVersion: PropTypes.string,
63 authRequestFailed: PropTypes.bool.isRequired,
63 removeNewsItem: PropTypes.func.isRequired, 64 removeNewsItem: PropTypes.func.isRequired,
64 reloadServicesAfterUpdate: PropTypes.func.isRequired, 65 reloadServicesAfterUpdate: PropTypes.func.isRequired,
65 installAppUpdate: PropTypes.func.isRequired, 66 installAppUpdate: PropTypes.func.isRequired,
@@ -91,6 +92,7 @@ class AppLayout extends Component {
91 showServicesUpdatedInfoBar, 92 showServicesUpdatedInfoBar,
92 appUpdateIsDownloaded, 93 appUpdateIsDownloaded,
93 nextAppReleaseVersion, 94 nextAppReleaseVersion,
95 authRequestFailed,
94 removeNewsItem, 96 removeNewsItem,
95 reloadServicesAfterUpdate, 97 reloadServicesAfterUpdate,
96 installAppUpdate, 98 installAppUpdate,
@@ -143,6 +145,18 @@ class AppLayout extends Component {
143 {intl.formatMessage(messages.requiredRequestsFailed)} 145 {intl.formatMessage(messages.requiredRequestsFailed)}
144 </InfoBar> 146 </InfoBar>
145 )} 147 )}
148 {authRequestFailed && (
149 <InfoBar
150 type="danger"
151 ctaLabel="Try again"
152 ctaLoading={areRequiredRequestsLoading}
153 sticky
154 onClick={retryRequiredRequests}
155 >
156 <span className="mdi mdi-flash" />
157 There were errors while trying to perform an authenticated request. Please try logging out and back in if this error persists.
158 </InfoBar>
159 )}
146 {showServicesUpdatedInfoBar && ( 160 {showServicesUpdatedInfoBar && (
147 <InfoBar 161 <InfoBar
148 type="primary" 162 type="primary"
diff --git a/src/containers/layout/AppLayoutContainer.js b/src/containers/layout/AppLayoutContainer.js
index cf3da71e8..38ed85986 100644
--- a/src/containers/layout/AppLayoutContainer.js
+++ b/src/containers/layout/AppLayoutContainer.js
@@ -136,6 +136,7 @@ export default @inject('stores', 'actions') @observer class AppLayoutContainer e
136 showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar} 136 showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar}
137 appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED} 137 appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED}
138 nextAppReleaseVersion={app.nextAppReleaseVersion} 138 nextAppReleaseVersion={app.nextAppReleaseVersion}
139 authRequestFailed={app.authRequestFailed}
139 sidebar={sidebar} 140 sidebar={sidebar}
140 workspacesDrawer={workspacesDrawer} 141 workspacesDrawer={workspacesDrawer}
141 services={servicesContainer} 142 services={servicesContainer}
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 0311a11a3..2bfcdf640 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -53,6 +53,8 @@ export default class AppStore extends Store {
53 53
54 @observable isOnline = navigator.onLine; 54 @observable isOnline = navigator.onLine;
55 55
56 @observable authRequestFailed = false;
57
56 @observable timeOfflineStart; 58 @observable timeOfflineStart;
57 59
58 @observable updateStatus = null; 60 @observable updateStatus = null;
diff --git a/src/stores/GlobalErrorStore.js b/src/stores/GlobalErrorStore.js
index 7a85c2daa..8bdafb68c 100644
--- a/src/stores/GlobalErrorStore.js
+++ b/src/stores/GlobalErrorStore.js
@@ -24,9 +24,12 @@ export default class GlobalErrorStore extends Store {
24 this.response = {}; 24 this.response = {};
25 } 25 }
26 if (this.error.status === 401) { 26 if (this.error.status === 401) {
27 this.actions.user.logout({ serverLogout: true }); 27 window.ferdi.stores.app.authRequestFailed = true;
28 // this.actions.user.logout({ serverLogout: true });
28 } 29 }
29 } 30 }
31 } else {
32 window.ferdi.stores.app.authRequestFailed = false;
30 } 33 }
31 }); 34 });
32} 35}
diff --git a/src/stores/NewsStore.js b/src/stores/NewsStore.js
index 43edeba8e..86e092592 100644
--- a/src/stores/NewsStore.js
+++ b/src/stores/NewsStore.js
@@ -29,9 +29,7 @@ export default class NewsStore extends Store {
29 } 29 }
30 30
31 @computed get latest() { 31 @computed get latest() {
32 // TODO: fix random logout issues and reactivate news 32 return this.latestNewsRequest.execute().result || [];
33 // return this.latestNewsRequest.execute().result || [];
34 return [];
35 } 33 }
36 34
37 // Actions 35 // Actions
diff --git a/src/styles/auth.scss b/src/styles/auth.scss
index 0a075036a..cbc720559 100644
--- a/src/styles/auth.scss
+++ b/src/styles/auth.scss
@@ -27,7 +27,7 @@
27} 27}
28 28
29.auth { 29.auth {
30 background: $theme-brand-primary; 30 background: $theme-brand-gradient;
31 display: flex; 31 display: flex;
32 justify-content: center; 32 justify-content: center;
33 33
diff --git a/src/styles/colors.scss b/src/styles/colors.scss
index 80c2fb633..d89d42b9e 100644
--- a/src/styles/colors.scss
+++ b/src/styles/colors.scss
@@ -1,6 +1,7 @@
1@import "./type-helper"; 1@import "./type-helper";
2 2
3$theme-brand-primary: convert-rgb-string-to-color($raw-theme-brand-primary); 3$theme-brand-primary: convert-rgb-string-to-color($raw-theme-brand-primary);
4$theme-brand-gradient: linear-gradient( 135deg, #CE9FFC 10%, #7367F0 100%);
4$theme-brand-success: convert-rgb-string-to-color($raw-theme-brand-success); 5$theme-brand-success: convert-rgb-string-to-color($raw-theme-brand-success);
5$theme-brand-info: convert-rgb-string-to-color($raw-theme-brand-info); 6$theme-brand-info: convert-rgb-string-to-color($raw-theme-brand-info);
6$theme-brand-warning: convert-rgb-string-to-color($raw-theme-brand-warning); 7$theme-brand-warning: convert-rgb-string-to-color($raw-theme-brand-warning);
diff --git a/src/theme/default/legacy.js b/src/theme/default/legacy.js
index b676dc1d9..46847c60b 100644
--- a/src/theme/default/legacy.js
+++ b/src/theme/default/legacy.js
@@ -1,5 +1,5 @@
1/* legacy config, injected into sass */ 1/* legacy config, injected into sass */
2export const themeBrandPrimary = '#3498db'; 2export const themeBrandPrimary = '#7367F0';
3export const themeBrandSuccess = '#5cb85c'; 3export const themeBrandSuccess = '#5cb85c';
4export const themeBrandInfo = '#5bc0de'; 4export const themeBrandInfo = '#5bc0de';
5export const themeBrandWarning = '#FF9F00'; 5export const themeBrandWarning = '#FF9F00';