From 70c4494b254688037c8b7033911d2d5f06e600a2 Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Wed, 5 Jun 2019 17:23:29 +0200 Subject: support app updates also for unauthenticated users --- src/components/auth/AuthLayout.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/components/auth/AuthLayout.js') 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 '../. import globalMessages from '../../i18n/globalMessages'; import { isWindows } from '../../environment'; +import AppUpdateInfoBar from '../AppUpdateInfoBar'; export default @observer class AuthLayout extends Component { static propTypes = { @@ -22,6 +23,13 @@ export default @observer class AuthLayout extends Component { isHealthCheckLoading: PropTypes.bool.isRequired, isFullScreen: PropTypes.bool.isRequired, darkMode: PropTypes.bool.isRequired, + nextAppReleaseVersion: PropTypes.string, + installAppUpdate: PropTypes.func.isRequired, + appUpdateIsDownloaded: PropTypes.bool.isRequired, + }; + + static defaultProps = { + nextAppReleaseVersion: null, }; static contextTypes = { @@ -38,6 +46,9 @@ export default @observer class AuthLayout extends Component { isHealthCheckLoading, isFullScreen, darkMode, + nextAppReleaseVersion, + installAppUpdate, + appUpdateIsDownloaded } = this.props; const { intl } = this.context; @@ -53,6 +64,12 @@ export default @observer class AuthLayout extends Component { {intl.formatMessage(globalMessages.notConnectedToTheInternet)} )} + {appUpdateIsDownloaded && ( + + )} {isOnline && !isAPIHealthy && ( Date: Wed, 5 Jun 2019 17:26:21 +0200 Subject: fix eslint issues --- src/components/auth/AuthLayout.js | 2 +- src/components/layout/AppLayout.js | 1 - src/i18n/locales/defaultMessages.json | 12 ++++++------ src/i18n/messages/src/components/layout/AppLayout.json | 12 ++++++------ 4 files changed, 13 insertions(+), 14 deletions(-) (limited to 'src/components/auth/AuthLayout.js') diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js index 9bde58461..3d43d4e5c 100644 --- a/src/components/auth/AuthLayout.js +++ b/src/components/auth/AuthLayout.js @@ -48,7 +48,7 @@ export default @observer class AuthLayout extends Component { darkMode, nextAppReleaseVersion, installAppUpdate, - appUpdateIsDownloaded + appUpdateIsDownloaded, } = this.props; const { intl } = this.context; diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 321eb8e3a..499bc097a 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js @@ -16,7 +16,6 @@ import ErrorBoundary from '../util/ErrorBoundary'; import { isWindows } from '../../environment'; import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; import { workspaceStore } from '../../features/workspaces'; -import { announcementActions } from '../../features/announcements/actions'; import AppUpdateInfoBar from '../AppUpdateInfoBar'; function createMarkup(HTMLString) { diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index 67ab39fe9..aedb0141c 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json @@ -669,39 +669,39 @@ "defaultMessage": "!!!Your services have been updated.", "end": { "column": 3, - "line": 30 + "line": 29 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.servicesUpdated", "start": { "column": 19, - "line": 27 + "line": 26 } }, { "defaultMessage": "!!!Reload services", "end": { "column": 3, - "line": 34 + "line": 33 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.buttonReloadServices", "start": { "column": 24, - "line": 31 + "line": 30 } }, { "defaultMessage": "!!!Could not load services and user information", "end": { "column": 3, - "line": 38 + "line": 37 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.requiredRequestsFailed", "start": { "column": 26, - "line": 35 + "line": 34 } } ], diff --git a/src/i18n/messages/src/components/layout/AppLayout.json b/src/i18n/messages/src/components/layout/AppLayout.json index b71889155..190c5dff7 100644 --- a/src/i18n/messages/src/components/layout/AppLayout.json +++ b/src/i18n/messages/src/components/layout/AppLayout.json @@ -4,11 +4,11 @@ "defaultMessage": "!!!Your services have been updated.", "file": "src/components/layout/AppLayout.js", "start": { - "line": 27, + "line": 26, "column": 19 }, "end": { - "line": 30, + "line": 29, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!Reload services", "file": "src/components/layout/AppLayout.js", "start": { - "line": 31, + "line": 30, "column": 24 }, "end": { - "line": 34, + "line": 33, "column": 3 } }, @@ -30,11 +30,11 @@ "defaultMessage": "!!!Could not load services and user information", "file": "src/components/layout/AppLayout.js", "start": { - "line": 35, + "line": 34, "column": 26 }, "end": { - "line": 38, + "line": 37, "column": 3 } } -- cgit v1.2.3-70-g09d2