aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-09-04 17:03:53 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-04 17:03:53 +0200
commitf39cbe7d803245702885b308ab1cee4551aea9a1 (patch)
tree56d2e5dbe6242bb64b03ba5028b8bac39ea0c7ed /src/components
parentUse namespaces when pulling docker base images since this is reqd for podman (diff)
downloadferdium-app-f39cbe7d803245702885b308ab1cee4551aea9a1.tar.gz
ferdium-app-f39cbe7d803245702885b308ab1cee4551aea9a1.tar.zst
ferdium-app-f39cbe7d803245702885b308ab1cee4551aea9a1.zip
chore: remove what's new functionality (#1864)
Diffstat (limited to 'src/components')
-rw-r--r--src/components/AppUpdateInfoBar.js24
-rw-r--r--src/components/auth/AuthLayout.js7
-rw-r--r--src/components/layout/AppLayout.js4
3 files changed, 10 insertions, 25 deletions
diff --git a/src/components/AppUpdateInfoBar.js b/src/components/AppUpdateInfoBar.js
index f51fe029b..30804262a 100644
--- a/src/components/AppUpdateInfoBar.js
+++ b/src/components/AppUpdateInfoBar.js
@@ -2,8 +2,9 @@ import React, { Component } from 'react';
2import PropTypes from 'prop-types'; 2import PropTypes from 'prop-types';
3import { defineMessages, intlShape } from 'react-intl'; 3import { defineMessages, intlShape } from 'react-intl';
4 4
5import { announcementActions } from '../features/announcements/actions';
6import InfoBar from './ui/InfoBar'; 5import InfoBar from './ui/InfoBar';
6import { GITHUB_FERDI_URL } from '../config';
7import { openExternalUrl } from '../helpers/url-helpers';
7 8
8const messages = defineMessages({ 9const messages = defineMessages({
9 updateAvailable: { 10 updateAvailable: {
@@ -23,25 +24,16 @@ const messages = defineMessages({
23class AppUpdateInfoBar extends Component { 24class AppUpdateInfoBar extends Component {
24 static propTypes = { 25 static propTypes = {
25 onInstallUpdate: PropTypes.func.isRequired, 26 onInstallUpdate: PropTypes.func.isRequired,
26 nextAppReleaseVersion: PropTypes.string,
27 onHide: PropTypes.func.isRequired, 27 onHide: PropTypes.func.isRequired,
28 }; 28 };
29 29
30 static defaultProps = {
31 nextAppReleaseVersion: null,
32 };
33
34 static contextTypes = { 30 static contextTypes = {
35 intl: intlShape, 31 intl: intlShape,
36 }; 32 };
37 33
38 render() { 34 render() {
39 const { intl } = this.context; 35 const { intl } = this.context;
40 const { 36 const { onInstallUpdate, onHide } = this.props;
41 onInstallUpdate,
42 nextAppReleaseVersion,
43 onHide,
44 } = this.props;
45 37
46 return ( 38 return (
47 <InfoBar 39 <InfoBar
@@ -51,12 +43,16 @@ class AppUpdateInfoBar extends Component {
51 onHide={onHide} 43 onHide={onHide}
52 > 44 >
53 <span className="mdi mdi-information" /> 45 <span className="mdi mdi-information" />
54 {intl.formatMessage(messages.updateAvailable)} 46 {intl.formatMessage(messages.updateAvailable)}{' '}
55 {' '}
56 <button 47 <button
57 className="info-bar__inline-button" 48 className="info-bar__inline-button"
58 type="button" 49 type="button"
59 onClick={() => announcementActions.show({ targetVersion: nextAppReleaseVersion })} 50 onClick={() =>
51 openExternalUrl(
52 `${GITHUB_FERDI_URL}/ferdi/blob/develop/CHANGELOG.md`,
53 true,
54 )
55 }
60 > 56 >
61 <u>{intl.formatMessage(messages.changelog)}</u> 57 <u>{intl.formatMessage(messages.changelog)}</u>
62 </button> 58 </button>
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js
index c0e6b982b..8235932c2 100644
--- a/src/components/auth/AuthLayout.js
+++ b/src/components/auth/AuthLayout.js
@@ -28,7 +28,6 @@ class AuthLayout extends Component {
28 retryHealthCheck: PropTypes.func.isRequired, 28 retryHealthCheck: PropTypes.func.isRequired,
29 isHealthCheckLoading: PropTypes.bool.isRequired, 29 isHealthCheckLoading: PropTypes.bool.isRequired,
30 isFullScreen: PropTypes.bool.isRequired, 30 isFullScreen: PropTypes.bool.isRequired,
31 nextAppReleaseVersion: PropTypes.string,
32 installAppUpdate: PropTypes.func.isRequired, 31 installAppUpdate: PropTypes.func.isRequired,
33 appUpdateIsDownloaded: PropTypes.bool.isRequired, 32 appUpdateIsDownloaded: PropTypes.bool.isRequired,
34 }; 33 };
@@ -37,10 +36,6 @@ class AuthLayout extends Component {
37 shouldShowAppUpdateInfoBar: true, 36 shouldShowAppUpdateInfoBar: true,
38 }; 37 };
39 38
40 static defaultProps = {
41 nextAppReleaseVersion: null,
42 };
43
44 static contextTypes = { 39 static contextTypes = {
45 intl: intlShape, 40 intl: intlShape,
46 }; 41 };
@@ -54,7 +49,6 @@ class AuthLayout extends Component {
54 retryHealthCheck, 49 retryHealthCheck,
55 isHealthCheckLoading, 50 isHealthCheckLoading,
56 isFullScreen, 51 isFullScreen,
57 nextAppReleaseVersion,
58 installAppUpdate, 52 installAppUpdate,
59 appUpdateIsDownloaded, 53 appUpdateIsDownloaded,
60 } = this.props; 54 } = this.props;
@@ -77,7 +71,6 @@ class AuthLayout extends Component {
77 )} 71 )}
78 {appUpdateIsDownloaded && this.state.shouldShowAppUpdateInfoBar && ( 72 {appUpdateIsDownloaded && this.state.shouldShowAppUpdateInfoBar && (
79 <AppUpdateInfoBar 73 <AppUpdateInfoBar
80 nextAppReleaseVersion={nextAppReleaseVersion}
81 onInstallUpdate={installAppUpdate} 74 onInstallUpdate={installAppUpdate}
82 onHide={() => { 75 onHide={() => {
83 this.setState({ shouldShowAppUpdateInfoBar: false }); 76 this.setState({ shouldShowAppUpdateInfoBar: false });
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js
index 00d7a759b..e6e5d40fe 100644
--- a/src/components/layout/AppLayout.js
+++ b/src/components/layout/AppLayout.js
@@ -76,7 +76,6 @@ class AppLayout extends Component {
76 news: MobxPropTypes.arrayOrObservableArray.isRequired, 76 news: MobxPropTypes.arrayOrObservableArray.isRequired,
77 showServicesUpdatedInfoBar: PropTypes.bool.isRequired, 77 showServicesUpdatedInfoBar: PropTypes.bool.isRequired,
78 appUpdateIsDownloaded: PropTypes.bool.isRequired, 78 appUpdateIsDownloaded: PropTypes.bool.isRequired,
79 nextAppReleaseVersion: PropTypes.string,
80 authRequestFailed: PropTypes.bool.isRequired, 79 authRequestFailed: PropTypes.bool.isRequired,
81 removeNewsItem: PropTypes.func.isRequired, 80 removeNewsItem: PropTypes.func.isRequired,
82 reloadServicesAfterUpdate: PropTypes.func.isRequired, 81 reloadServicesAfterUpdate: PropTypes.func.isRequired,
@@ -93,7 +92,6 @@ class AppLayout extends Component {
93 92
94 static defaultProps = { 93 static defaultProps = {
95 children: [], 94 children: [],
96 nextAppReleaseVersion: null,
97 }; 95 };
98 96
99 static contextTypes = { 97 static contextTypes = {
@@ -111,7 +109,6 @@ class AppLayout extends Component {
111 news, 109 news,
112 showServicesUpdatedInfoBar, 110 showServicesUpdatedInfoBar,
113 appUpdateIsDownloaded, 111 appUpdateIsDownloaded,
114 nextAppReleaseVersion,
115 authRequestFailed, 112 authRequestFailed,
116 removeNewsItem, 113 removeNewsItem,
117 reloadServicesAfterUpdate, 114 reloadServicesAfterUpdate,
@@ -195,7 +192,6 @@ class AppLayout extends Component {
195 )} 192 )}
196 {appUpdateIsDownloaded && this.state.shouldShowAppUpdateInfoBar && ( 193 {appUpdateIsDownloaded && this.state.shouldShowAppUpdateInfoBar && (
197 <AppUpdateInfoBar 194 <AppUpdateInfoBar
198 nextAppReleaseVersion={nextAppReleaseVersion}
199 onInstallUpdate={installAppUpdate} 195 onInstallUpdate={installAppUpdate}
200 onHide={() => { 196 onHide={() => {
201 this.setState({ shouldShowAppUpdateInfoBar: false }); 197 this.setState({ shouldShowAppUpdateInfoBar: false });