diff options
author | 2019-07-19 15:02:21 +0200 | |
---|---|---|
committer | 2019-07-19 15:02:21 +0200 | |
commit | 86f4814dd5eac4d8852a1e5a360977ba64d05897 (patch) | |
tree | fafab1227432f318c408d4454adcdcc7978da48c /src/components | |
parent | Add production and dev urls for todos frontend (diff) | |
parent | Update changelog (diff) | |
download | ferdium-app-86f4814dd5eac4d8852a1e5a360977ba64d05897.tar.gz ferdium-app-86f4814dd5eac4d8852a1e5a360977ba64d05897.tar.zst ferdium-app-86f4814dd5eac4d8852a1e5a360977ba64d05897.zip |
Merge branch 'release/5.2.0' into feature/todos
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/auth/AuthLayout.js | 6 | ||||
-rw-r--r-- | src/components/layout/AppLayout.js | 126 |
2 files changed, 63 insertions, 69 deletions
diff --git a/src/components/auth/AuthLayout.js b/src/components/auth/AuthLayout.js index 3d43d4e5c..75a8cfc61 100644 --- a/src/components/auth/AuthLayout.js +++ b/src/components/auth/AuthLayout.js | |||
@@ -22,7 +22,6 @@ export default @observer class AuthLayout extends Component { | |||
22 | retryHealthCheck: PropTypes.func.isRequired, | 22 | retryHealthCheck: PropTypes.func.isRequired, |
23 | isHealthCheckLoading: PropTypes.bool.isRequired, | 23 | isHealthCheckLoading: PropTypes.bool.isRequired, |
24 | isFullScreen: PropTypes.bool.isRequired, | 24 | isFullScreen: PropTypes.bool.isRequired, |
25 | darkMode: PropTypes.bool.isRequired, | ||
26 | nextAppReleaseVersion: PropTypes.string, | 25 | nextAppReleaseVersion: PropTypes.string, |
27 | installAppUpdate: PropTypes.func.isRequired, | 26 | installAppUpdate: PropTypes.func.isRequired, |
28 | appUpdateIsDownloaded: PropTypes.bool.isRequired, | 27 | appUpdateIsDownloaded: PropTypes.bool.isRequired, |
@@ -45,7 +44,6 @@ export default @observer class AuthLayout extends Component { | |||
45 | retryHealthCheck, | 44 | retryHealthCheck, |
46 | isHealthCheckLoading, | 45 | isHealthCheckLoading, |
47 | isFullScreen, | 46 | isFullScreen, |
48 | darkMode, | ||
49 | nextAppReleaseVersion, | 47 | nextAppReleaseVersion, |
50 | installAppUpdate, | 48 | installAppUpdate, |
51 | appUpdateIsDownloaded, | 49 | appUpdateIsDownloaded, |
@@ -53,7 +51,7 @@ export default @observer class AuthLayout extends Component { | |||
53 | const { intl } = this.context; | 51 | const { intl } = this.context; |
54 | 52 | ||
55 | return ( | 53 | return ( |
56 | <div className={darkMode ? 'theme__dark' : ''}> | 54 | <> |
57 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon="assets/images/logo.svg" />} | 55 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon="assets/images/logo.svg" />} |
58 | <div className="auth"> | 56 | <div className="auth"> |
59 | {!isOnline && ( | 57 | {!isOnline && ( |
@@ -93,7 +91,7 @@ export default @observer class AuthLayout extends Component { | |||
93 | <img src="./assets/images/adlk.svg" alt="" /> | 91 | <img src="./assets/images/adlk.svg" alt="" /> |
94 | </Link> | 92 | </Link> |
95 | </div> | 93 | </div> |
96 | </div> | 94 | </> |
97 | ); | 95 | ); |
98 | } | 96 | } |
99 | } | 97 | } |
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 797db6eb5..7f2f707fb 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -71,7 +71,6 @@ class AppLayout extends Component { | |||
71 | areRequiredRequestsSuccessful: PropTypes.bool.isRequired, | 71 | areRequiredRequestsSuccessful: PropTypes.bool.isRequired, |
72 | retryRequiredRequests: PropTypes.func.isRequired, | 72 | retryRequiredRequests: PropTypes.func.isRequired, |
73 | areRequiredRequestsLoading: PropTypes.bool.isRequired, | 73 | areRequiredRequestsLoading: PropTypes.bool.isRequired, |
74 | darkMode: PropTypes.bool.isRequired, | ||
75 | isDelayAppScreenVisible: PropTypes.bool.isRequired, | 74 | isDelayAppScreenVisible: PropTypes.bool.isRequired, |
76 | }; | 75 | }; |
77 | 76 | ||
@@ -105,7 +104,6 @@ class AppLayout extends Component { | |||
105 | areRequiredRequestsSuccessful, | 104 | areRequiredRequestsSuccessful, |
106 | retryRequiredRequests, | 105 | retryRequiredRequests, |
107 | areRequiredRequestsLoading, | 106 | areRequiredRequestsLoading, |
108 | darkMode, | ||
109 | isDelayAppScreenVisible, | 107 | isDelayAppScreenVisible, |
110 | } = this.props; | 108 | } = this.props; |
111 | 109 | ||
@@ -113,69 +111,67 @@ class AppLayout extends Component { | |||
113 | 111 | ||
114 | return ( | 112 | return ( |
115 | <ErrorBoundary> | 113 | <ErrorBoundary> |
116 | <div className={(darkMode ? 'theme__dark' : '')}> | 114 | <div className="app"> |
117 | <div className="app"> | 115 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon="assets/images/logo.svg" />} |
118 | {isWindows && !isFullScreen && <TitleBar menu={window.franz.menu.template} icon="assets/images/logo.svg" />} | 116 | <div className={`app__content ${classes.appContent}`}> |
119 | <div className={`app__content ${classes.appContent}`}> | 117 | {workspacesDrawer} |
120 | {workspacesDrawer} | 118 | {sidebar} |
121 | {sidebar} | 119 | <div className="app__service"> |
122 | <div className="app__service"> | 120 | <WorkspaceSwitchingIndicator /> |
123 | <WorkspaceSwitchingIndicator /> | 121 | {news.length > 0 && news.map(item => ( |
124 | {news.length > 0 && news.map(item => ( | 122 | <InfoBar |
125 | <InfoBar | 123 | key={item.id} |
126 | key={item.id} | 124 | position="top" |
127 | position="top" | 125 | type={item.type} |
128 | type={item.type} | 126 | sticky={item.sticky} |
129 | sticky={item.sticky} | 127 | onHide={() => removeNewsItem({ newsId: item.id })} |
130 | onHide={() => removeNewsItem({ newsId: item.id })} | 128 | > |
131 | > | 129 | <span dangerouslySetInnerHTML={createMarkup(item.message)} /> |
132 | <span dangerouslySetInnerHTML={createMarkup(item.message)} /> | 130 | </InfoBar> |
133 | </InfoBar> | 131 | ))} |
134 | ))} | 132 | {/* {!isOnline && ( |
135 | {/* {!isOnline && ( | 133 | <InfoBar |
136 | <InfoBar | 134 | type="danger" |
137 | type="danger" | 135 | sticky |
138 | sticky | 136 | > |
139 | > | 137 | <span className="mdi mdi-flash" /> |
140 | <span className="mdi mdi-flash" /> | 138 | {intl.formatMessage(globalMessages.notConnectedToTheInternet)} |
141 | {intl.formatMessage(globalMessages.notConnectedToTheInternet)} | 139 | </InfoBar> |
142 | </InfoBar> | 140 | )} */} |
143 | )} */} | 141 | {!areRequiredRequestsSuccessful && showRequiredRequestsError && ( |
144 | {!areRequiredRequestsSuccessful && showRequiredRequestsError && ( | 142 | <InfoBar |
145 | <InfoBar | 143 | type="danger" |
146 | type="danger" | 144 | ctaLabel="Try again" |
147 | ctaLabel="Try again" | 145 | ctaLoading={areRequiredRequestsLoading} |
148 | ctaLoading={areRequiredRequestsLoading} | 146 | sticky |
149 | sticky | 147 | onClick={retryRequiredRequests} |
150 | onClick={retryRequiredRequests} | 148 | > |
151 | > | 149 | <span className="mdi mdi-flash" /> |
152 | <span className="mdi mdi-flash" /> | 150 | {intl.formatMessage(messages.requiredRequestsFailed)} |
153 | {intl.formatMessage(messages.requiredRequestsFailed)} | 151 | </InfoBar> |
154 | </InfoBar> | 152 | )} |
155 | )} | 153 | {showServicesUpdatedInfoBar && ( |
156 | {showServicesUpdatedInfoBar && ( | 154 | <InfoBar |
157 | <InfoBar | 155 | type="primary" |
158 | type="primary" | 156 | ctaLabel={intl.formatMessage(messages.buttonReloadServices)} |
159 | ctaLabel={intl.formatMessage(messages.buttonReloadServices)} | 157 | onClick={reloadServicesAfterUpdate} |
160 | onClick={reloadServicesAfterUpdate} | 158 | sticky |
161 | sticky | 159 | > |
162 | > | 160 | <span className="mdi mdi-power-plug" /> |
163 | <span className="mdi mdi-power-plug" /> | 161 | {intl.formatMessage(messages.servicesUpdated)} |
164 | {intl.formatMessage(messages.servicesUpdated)} | 162 | </InfoBar> |
165 | </InfoBar> | 163 | )} |
166 | )} | 164 | {appUpdateIsDownloaded && ( |
167 | {appUpdateIsDownloaded && ( | 165 | <AppUpdateInfoBar |
168 | <AppUpdateInfoBar | 166 | nextAppReleaseVersion={nextAppReleaseVersion} |
169 | nextAppReleaseVersion={nextAppReleaseVersion} | 167 | onInstallUpdate={installAppUpdate} |
170 | onInstallUpdate={installAppUpdate} | 168 | /> |
171 | /> | 169 | )} |
172 | )} | 170 | {isDelayAppScreenVisible && (<DelayApp />)} |
173 | {isDelayAppScreenVisible && (<DelayApp />)} | 171 | <BasicAuth /> |
174 | <BasicAuth /> | 172 | <ShareFranz /> |
175 | <ShareFranz /> | 173 | {services} |
176 | {services} | 174 | {children} |
177 | {children} | ||
178 | </div> | ||
179 | </div> | 175 | </div> |
180 | <TodosWebview authToken={authToken} /> | 176 | <TodosWebview authToken={authToken} /> |
181 | </div> | 177 | </div> |