diff options
author | 2019-04-13 20:58:37 +0200 | |
---|---|---|
committer | 2019-04-13 20:58:37 +0200 | |
commit | 8e623e84cf21068561217a509c0761d524dfbc29 (patch) | |
tree | a83f307c3ce087169e3a1d55418fa78a71b7b4dc /src/components/layout | |
parent | Use store reactions (diff) | |
parent | Merge branch 'feature/announcements' into develop (diff) | |
download | ferdium-app-8e623e84cf21068561217a509c0761d524dfbc29.tar.gz ferdium-app-8e623e84cf21068561217a509c0761d524dfbc29.tar.zst ferdium-app-8e623e84cf21068561217a509c0761d524dfbc29.zip |
Merge branch 'develop' into chore/streamline-dashboard
Diffstat (limited to 'src/components/layout')
-rw-r--r-- | src/components/layout/AppLayout.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index b7f7722dd..d5febfaf4 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -14,8 +14,10 @@ import ErrorBoundary from '../util/ErrorBoundary'; | |||
14 | // import globalMessages from '../../i18n/globalMessages'; | 14 | // import globalMessages from '../../i18n/globalMessages'; |
15 | 15 | ||
16 | import { isWindows } from '../../environment'; | 16 | import { isWindows } from '../../environment'; |
17 | import AnnouncementScreen from '../../features/announcements/components/AnnouncementScreen'; | ||
17 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; | 18 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; |
18 | import { workspaceStore } from '../../features/workspaces'; | 19 | import { workspaceStore } from '../../features/workspaces'; |
20 | import { announcementActions } from '../../features/announcements/actions'; | ||
19 | 21 | ||
20 | function createMarkup(HTMLString) { | 22 | function createMarkup(HTMLString) { |
21 | return { __html: HTMLString }; | 23 | return { __html: HTMLString }; |
@@ -71,6 +73,7 @@ class AppLayout extends Component { | |||
71 | // isOnline: PropTypes.bool.isRequired, | 73 | // isOnline: PropTypes.bool.isRequired, |
72 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, | 74 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, |
73 | appUpdateIsDownloaded: PropTypes.bool.isRequired, | 75 | appUpdateIsDownloaded: PropTypes.bool.isRequired, |
76 | nextAppReleaseVersion: PropTypes.string, | ||
74 | removeNewsItem: PropTypes.func.isRequired, | 77 | removeNewsItem: PropTypes.func.isRequired, |
75 | reloadServicesAfterUpdate: PropTypes.func.isRequired, | 78 | reloadServicesAfterUpdate: PropTypes.func.isRequired, |
76 | installAppUpdate: PropTypes.func.isRequired, | 79 | installAppUpdate: PropTypes.func.isRequired, |
@@ -80,10 +83,12 @@ class AppLayout extends Component { | |||
80 | areRequiredRequestsLoading: PropTypes.bool.isRequired, | 83 | areRequiredRequestsLoading: PropTypes.bool.isRequired, |
81 | darkMode: PropTypes.bool.isRequired, | 84 | darkMode: PropTypes.bool.isRequired, |
82 | isDelayAppScreenVisible: PropTypes.bool.isRequired, | 85 | isDelayAppScreenVisible: PropTypes.bool.isRequired, |
86 | isAnnouncementVisible: PropTypes.bool.isRequired, | ||
83 | }; | 87 | }; |
84 | 88 | ||
85 | static defaultProps = { | 89 | static defaultProps = { |
86 | children: [], | 90 | children: [], |
91 | nextAppReleaseVersion: null, | ||
87 | }; | 92 | }; |
88 | 93 | ||
89 | static contextTypes = { | 94 | static contextTypes = { |
@@ -102,6 +107,7 @@ class AppLayout extends Component { | |||
102 | news, | 107 | news, |
103 | showServicesUpdatedInfoBar, | 108 | showServicesUpdatedInfoBar, |
104 | appUpdateIsDownloaded, | 109 | appUpdateIsDownloaded, |
110 | nextAppReleaseVersion, | ||
105 | removeNewsItem, | 111 | removeNewsItem, |
106 | reloadServicesAfterUpdate, | 112 | reloadServicesAfterUpdate, |
107 | installAppUpdate, | 113 | installAppUpdate, |
@@ -111,6 +117,7 @@ class AppLayout extends Component { | |||
111 | areRequiredRequestsLoading, | 117 | areRequiredRequestsLoading, |
112 | darkMode, | 118 | darkMode, |
113 | isDelayAppScreenVisible, | 119 | isDelayAppScreenVisible, |
120 | isAnnouncementVisible, | ||
114 | } = this.props; | 121 | } = this.props; |
115 | 122 | ||
116 | const { intl } = this.context; | 123 | const { intl } = this.context; |
@@ -178,14 +185,19 @@ class AppLayout extends Component { | |||
178 | <span className="mdi mdi-information" /> | 185 | <span className="mdi mdi-information" /> |
179 | {intl.formatMessage(messages.updateAvailable)} | 186 | {intl.formatMessage(messages.updateAvailable)} |
180 | {' '} | 187 | {' '} |
181 | <a href="https://meetfranz.com/changelog" target="_blank"> | 188 | <button |
189 | className="info-bar__inline-button" | ||
190 | type="button" | ||
191 | onClick={() => announcementActions.show({ targetVersion: nextAppReleaseVersion })} | ||
192 | > | ||
182 | <u>{intl.formatMessage(messages.changelog)}</u> | 193 | <u>{intl.formatMessage(messages.changelog)}</u> |
183 | </a> | 194 | </button> |
184 | </InfoBar> | 195 | </InfoBar> |
185 | )} | 196 | )} |
186 | {isDelayAppScreenVisible && (<DelayApp />)} | 197 | {isDelayAppScreenVisible && (<DelayApp />)} |
187 | <BasicAuth /> | 198 | <BasicAuth /> |
188 | <ShareFranz /> | 199 | <ShareFranz /> |
200 | {isAnnouncementVisible && (<AnnouncementScreen />)} | ||
189 | {services} | 201 | {services} |
190 | </div> | 202 | </div> |
191 | </div> | 203 | </div> |