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