aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-06-05 17:23:29 +0200
committerLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-06-05 17:23:29 +0200
commit70c4494b254688037c8b7033911d2d5f06e600a2 (patch)
tree5ef06c2b0fe08a170a1b25323f32009efc6d06bc /src/components/auth
parentFix case in menu label (diff)
downloadferdium-app-70c4494b254688037c8b7033911d2d5f06e600a2.tar.gz
ferdium-app-70c4494b254688037c8b7033911d2d5f06e600a2.tar.zst
ferdium-app-70c4494b254688037c8b7033911d2d5f06e600a2.zip
support app updates also for unauthenticated users
Diffstat (limited to 'src/components/auth')
-rw-r--r--src/components/auth/AuthLayout.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js
index ac8fdbe5b..9bde58461 100644
--- a/src/components/auth/AuthLayout.js
+++ b/src/components/auth/AuthLayout.js
@@ -11,6 +11,7 @@ import { oneOrManyChildElements, globalError as globalErrorPropType } from '../.
11import globalMessages from '../../i18n/globalMessages'; 11import globalMessages from '../../i18n/globalMessages';
12 12
13import { isWindows } from '../../environment'; 13import { isWindows } from '../../environment';
14import AppUpdateInfoBar from '../AppUpdateInfoBar';
14 15
15export default @observer class AuthLayout extends Component { 16export default @observer class AuthLayout extends Component {
16 static propTypes = { 17 static propTypes = {
@@ -22,6 +23,13 @@ export default @observer class AuthLayout extends Component {
22 isHealthCheckLoading: PropTypes.bool.isRequired, 23 isHealthCheckLoading: PropTypes.bool.isRequired,
23 isFullScreen: PropTypes.bool.isRequired, 24 isFullScreen: PropTypes.bool.isRequired,
24 darkMode: PropTypes.bool.isRequired, 25 darkMode: PropTypes.bool.isRequired,
26 nextAppReleaseVersion: PropTypes.string,
27 installAppUpdate: PropTypes.func.isRequired,
28 appUpdateIsDownloaded: PropTypes.bool.isRequired,
29 };
30
31 static defaultProps = {
32 nextAppReleaseVersion: null,
25 }; 33 };
26 34
27 static contextTypes = { 35 static contextTypes = {
@@ -38,6 +46,9 @@ export default @observer class AuthLayout extends Component {
38 isHealthCheckLoading, 46 isHealthCheckLoading,
39 isFullScreen, 47 isFullScreen,
40 darkMode, 48 darkMode,
49 nextAppReleaseVersion,
50 installAppUpdate,
51 appUpdateIsDownloaded
41 } = this.props; 52 } = this.props;
42 const { intl } = this.context; 53 const { intl } = this.context;
43 54
@@ -53,6 +64,12 @@ export default @observer class AuthLayout extends Component {
53 {intl.formatMessage(globalMessages.notConnectedToTheInternet)} 64 {intl.formatMessage(globalMessages.notConnectedToTheInternet)}
54 </InfoBar> 65 </InfoBar>
55 )} 66 )}
67 {appUpdateIsDownloaded && (
68 <AppUpdateInfoBar
69 nextAppReleaseVersion={nextAppReleaseVersion}
70 onInstallUpdate={installAppUpdate}
71 />
72 )}
56 {isOnline && !isAPIHealthy && ( 73 {isOnline && !isAPIHealthy && (
57 <InfoBar 74 <InfoBar
58 type="danger" 75 type="danger"