diff options
author | 2021-09-26 16:59:21 +0100 | |
---|---|---|
committer | 2021-09-26 16:59:21 +0100 | |
commit | 0d8a7e3edf07678a8428ca8206743ecc9cd5f22b (patch) | |
tree | e249d335da171c54b3757667da0b881593c4310f /src/components | |
parent | refactor: remove references to 'electron/remote' - part deux (#1987) (diff) | |
download | ferdium-app-0d8a7e3edf07678a8428ca8206743ecc9cd5f22b.tar.gz ferdium-app-0d8a7e3edf07678a8428ca8206743ecc9cd5f22b.tar.zst ferdium-app-0d8a7e3edf07678a8428ca8206743ecc9cd5f22b.zip |
Make services update infobar dismissable (#1992)
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/layout/AppLayout.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 83e037083..9f8e217b9 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -88,6 +88,7 @@ class AppLayout extends Component { | |||
88 | 88 | ||
89 | state = { | 89 | state = { |
90 | shouldShowAppUpdateInfoBar: true, | 90 | shouldShowAppUpdateInfoBar: true, |
91 | shouldShowServicesUpdatedInfoBar: true, | ||
91 | }; | 92 | }; |
92 | 93 | ||
93 | static defaultProps = { | 94 | static defaultProps = { |
@@ -175,12 +176,14 @@ class AppLayout extends Component { | |||
175 | {intl.formatMessage(messages.authRequestFailed)} | 176 | {intl.formatMessage(messages.authRequestFailed)} |
176 | </InfoBar> | 177 | </InfoBar> |
177 | )} | 178 | )} |
178 | {showServicesUpdatedInfoBar && ( | 179 | {showServicesUpdatedInfoBar && this.state.shouldShowServicesUpdatedInfoBar && ( |
179 | <InfoBar | 180 | <InfoBar |
180 | type="primary" | 181 | type="primary" |
181 | ctaLabel={intl.formatMessage(messages.buttonReloadServices)} | 182 | ctaLabel={intl.formatMessage(messages.buttonReloadServices)} |
182 | onClick={reloadServicesAfterUpdate} | 183 | onClick={reloadServicesAfterUpdate} |
183 | sticky | 184 | onHide={() => { |
185 | this.setState({ shouldShowServicesUpdatedInfoBar: false }); | ||
186 | }} | ||
184 | > | 187 | > |
185 | <span className="mdi mdi-power-plug" /> | 188 | <span className="mdi mdi-power-plug" /> |
186 | {intl.formatMessage(messages.servicesUpdated)} | 189 | {intl.formatMessage(messages.servicesUpdated)} |