diff options
Diffstat (limited to 'src/components/layout/AppLayout.js')
-rw-r--r-- | src/components/layout/AppLayout.js | 41 |
1 files changed, 6 insertions, 35 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index d0476ef04..c66004183 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -13,10 +13,9 @@ import ErrorBoundary from '../util/ErrorBoundary'; | |||
13 | // import globalMessages from '../../i18n/globalMessages'; | 13 | // import globalMessages from '../../i18n/globalMessages'; |
14 | 14 | ||
15 | import { isWindows } from '../../environment'; | 15 | import { isWindows } from '../../environment'; |
16 | import AnnouncementScreen from '../../features/announcements/components/AnnouncementScreen'; | ||
17 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; | 16 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; |
18 | import { workspaceStore } from '../../features/workspaces'; | 17 | import { workspaceStore } from '../../features/workspaces'; |
19 | import { announcementActions } from '../../features/announcements/actions'; | 18 | import AppUpdateInfoBar from '../AppUpdateInfoBar'; |
20 | 19 | ||
21 | function createMarkup(HTMLString) { | 20 | function createMarkup(HTMLString) { |
22 | return { __html: HTMLString }; | 21 | return { __html: HTMLString }; |
@@ -27,22 +26,10 @@ const messages = defineMessages({ | |||
27 | id: 'infobar.servicesUpdated', | 26 | id: 'infobar.servicesUpdated', |
28 | defaultMessage: '!!!Your services have been updated.', | 27 | defaultMessage: '!!!Your services have been updated.', |
29 | }, | 28 | }, |
30 | updateAvailable: { | ||
31 | id: 'infobar.updateAvailable', | ||
32 | defaultMessage: '!!!A new update for Franz is available.', | ||
33 | }, | ||
34 | buttonReloadServices: { | 29 | buttonReloadServices: { |
35 | id: 'infobar.buttonReloadServices', | 30 | id: 'infobar.buttonReloadServices', |
36 | defaultMessage: '!!!Reload services', | 31 | defaultMessage: '!!!Reload services', |
37 | }, | 32 | }, |
38 | changelog: { | ||
39 | id: 'infobar.buttonChangelog', | ||
40 | defaultMessage: '!!!Changelog', | ||
41 | }, | ||
42 | buttonInstallUpdate: { | ||
43 | id: 'infobar.buttonInstallUpdate', | ||
44 | defaultMessage: '!!!Restart & install update', | ||
45 | }, | ||
46 | requiredRequestsFailed: { | 33 | requiredRequestsFailed: { |
47 | id: 'infobar.requiredRequestsFailed', | 34 | id: 'infobar.requiredRequestsFailed', |
48 | defaultMessage: '!!!Could not load services and user information', | 35 | defaultMessage: '!!!Could not load services and user information', |
@@ -82,7 +69,6 @@ class AppLayout extends Component { | |||
82 | areRequiredRequestsLoading: PropTypes.bool.isRequired, | 69 | areRequiredRequestsLoading: PropTypes.bool.isRequired, |
83 | darkMode: PropTypes.bool.isRequired, | 70 | darkMode: PropTypes.bool.isRequired, |
84 | isDelayAppScreenVisible: PropTypes.bool.isRequired, | 71 | isDelayAppScreenVisible: PropTypes.bool.isRequired, |
85 | isAnnouncementVisible: PropTypes.bool.isRequired, | ||
86 | }; | 72 | }; |
87 | 73 | ||
88 | static defaultProps = { | 74 | static defaultProps = { |
@@ -116,7 +102,6 @@ class AppLayout extends Component { | |||
116 | areRequiredRequestsLoading, | 102 | areRequiredRequestsLoading, |
117 | darkMode, | 103 | darkMode, |
118 | isDelayAppScreenVisible, | 104 | isDelayAppScreenVisible, |
119 | isAnnouncementVisible, | ||
120 | } = this.props; | 105 | } = this.props; |
121 | 106 | ||
122 | const { intl } = this.context; | 107 | const { intl } = this.context; |
@@ -175,32 +160,18 @@ class AppLayout extends Component { | |||
175 | </InfoBar> | 160 | </InfoBar> |
176 | )} | 161 | )} |
177 | {appUpdateIsDownloaded && ( | 162 | {appUpdateIsDownloaded && ( |
178 | <InfoBar | 163 | <AppUpdateInfoBar |
179 | type="primary" | 164 | nextAppReleaseVersion={nextAppReleaseVersion} |
180 | ctaLabel={intl.formatMessage(messages.buttonInstallUpdate)} | 165 | onInstallUpdate={installAppUpdate} |
181 | onClick={installAppUpdate} | 166 | /> |
182 | sticky | ||
183 | > | ||
184 | <span className="mdi mdi-information" /> | ||
185 | {intl.formatMessage(messages.updateAvailable)} | ||
186 | {' '} | ||
187 | <button | ||
188 | className="info-bar__inline-button" | ||
189 | type="button" | ||
190 | onClick={() => announcementActions.show({ targetVersion: nextAppReleaseVersion })} | ||
191 | > | ||
192 | <u>{intl.formatMessage(messages.changelog)}</u> | ||
193 | </button> | ||
194 | </InfoBar> | ||
195 | )} | 167 | )} |
196 | <BasicAuth /> | 168 | <BasicAuth /> |
197 | <ShareFranz /> | 169 | <ShareFranz /> |
198 | {isAnnouncementVisible && (<AnnouncementScreen />)} | ||
199 | {services} | 170 | {services} |
171 | {children} | ||
200 | </div> | 172 | </div> |
201 | </div> | 173 | </div> |
202 | </div> | 174 | </div> |
203 | {children} | ||
204 | </div> | 175 | </div> |
205 | </ErrorBoundary> | 176 | </ErrorBoundary> |
206 | ); | 177 | ); |