diff options
author | kytwb <kytwb@pm.me> | 2022-01-05 18:18:55 +0100 |
---|---|---|
committer | kytwb <kytwb@pm.me> | 2022-01-05 18:18:55 +0100 |
commit | 7bffdc7f81dd365858003764beb3a921e6e043e7 (patch) | |
tree | 75c20658e95cb5d5c3e8a1c8cabb2b04ab3cab73 /src | |
parent | Replace hard-coded popular services in internal server (diff) | |
download | ferdium-app-7bffdc7f81dd365858003764beb3a921e6e043e7.tar.gz ferdium-app-7bffdc7f81dd365858003764beb3a921e6e043e7.tar.zst ferdium-app-7bffdc7f81dd365858003764beb3a921e6e043e7.zip |
Link showServicesUpdatedInfoBar to automaticUpdates
Diffstat (limited to 'src')
-rw-r--r-- | src/components/layout/AppLayout.js | 6 | ||||
-rw-r--r-- | src/components/layout/Sidebar.js | 7 | ||||
-rw-r--r-- | src/components/settings/navigation/SettingsNavigation.js | 4 | ||||
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 3 | ||||
-rw-r--r-- | src/containers/layout/AppLayoutContainer.js | 2 | ||||
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 1 | ||||
-rw-r--r-- | src/stores/AppStore.js | 5 |
7 files changed, 15 insertions, 13 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 4474fe0f4..5d7b6b85c 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -87,7 +87,6 @@ class AppLayout extends Component { | |||
87 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, | 87 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, |
88 | appUpdateIsDownloaded: PropTypes.bool.isRequired, | 88 | appUpdateIsDownloaded: PropTypes.bool.isRequired, |
89 | authRequestFailed: PropTypes.bool.isRequired, | 89 | authRequestFailed: PropTypes.bool.isRequired, |
90 | reloadServicesAfterUpdate: PropTypes.func.isRequired, | ||
91 | installAppUpdate: PropTypes.func.isRequired, | 90 | installAppUpdate: PropTypes.func.isRequired, |
92 | showRequiredRequestsError: PropTypes.bool.isRequired, | 91 | showRequiredRequestsError: PropTypes.bool.isRequired, |
93 | areRequiredRequestsSuccessful: PropTypes.bool.isRequired, | 92 | areRequiredRequestsSuccessful: PropTypes.bool.isRequired, |
@@ -115,7 +114,6 @@ class AppLayout extends Component { | |||
115 | showServicesUpdatedInfoBar, | 114 | showServicesUpdatedInfoBar, |
116 | appUpdateIsDownloaded, | 115 | appUpdateIsDownloaded, |
117 | authRequestFailed, | 116 | authRequestFailed, |
118 | reloadServicesAfterUpdate, | ||
119 | installAppUpdate, | 117 | installAppUpdate, |
120 | settings, | 118 | settings, |
121 | showRequiredRequestsError, | 119 | showRequiredRequestsError, |
@@ -175,12 +173,12 @@ class AppLayout extends Component { | |||
175 | {intl.formatMessage(messages.authRequestFailed)} | 173 | {intl.formatMessage(messages.authRequestFailed)} |
176 | </InfoBar> | 174 | </InfoBar> |
177 | )} | 175 | )} |
178 | {showServicesUpdatedInfoBar && | 176 | {automaticUpdates && showServicesUpdatedInfoBar && |
179 | this.state.shouldShowServicesUpdatedInfoBar && ( | 177 | this.state.shouldShowServicesUpdatedInfoBar && ( |
180 | <InfoBar | 178 | <InfoBar |
181 | type="primary" | 179 | type="primary" |
182 | ctaLabel={intl.formatMessage(messages.buttonReloadServices)} | 180 | ctaLabel={intl.formatMessage(messages.buttonReloadServices)} |
183 | onClick={reloadServicesAfterUpdate} | 181 | onClick={() => window.location.reload()} |
184 | onHide={() => { | 182 | onHide={() => { |
185 | this.setState({ | 183 | this.setState({ |
186 | shouldShowServicesUpdatedInfoBar: false, | 184 | shouldShowServicesUpdatedInfoBar: false, |
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js index 1cbdcfe46..3e24c9230 100644 --- a/src/components/layout/Sidebar.js +++ b/src/components/layout/Sidebar.js | |||
@@ -74,6 +74,7 @@ class Sidebar extends Component { | |||
74 | toggleNotifications: PropTypes.func.isRequired, | 74 | toggleNotifications: PropTypes.func.isRequired, |
75 | toggleAudio: PropTypes.func.isRequired, | 75 | toggleAudio: PropTypes.func.isRequired, |
76 | toggleDarkMode: PropTypes.func.isRequired, | 76 | toggleDarkMode: PropTypes.func.isRequired, |
77 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, | ||
77 | showMessageBadgeWhenMutedSetting: PropTypes.bool.isRequired, | 78 | showMessageBadgeWhenMutedSetting: PropTypes.bool.isRequired, |
78 | showServiceNameSetting: PropTypes.bool.isRequired, | 79 | showServiceNameSetting: PropTypes.bool.isRequired, |
79 | showMessageBadgesEvenWhenMuted: PropTypes.bool.isRequired, | 80 | showMessageBadgesEvenWhenMuted: PropTypes.bool.isRequired, |
@@ -234,10 +235,10 @@ class Sidebar extends Component { | |||
234 | > | 235 | > |
235 | <Icon icon={mdiCog} size={1.5} /> | 236 | <Icon icon={mdiCog} size={1.5} /> |
236 | { | 237 | { |
237 | (this.props.stores.settings.app.automaticUpdates && | 238 | this.props.stores.settings.app.automaticUpdates && |
238 | (this.props.stores.app.updateStatus === this.props.stores.app.updateStatusTypes.AVAILABLE || | 239 | (this.props.stores.app.updateStatus === this.props.stores.app.updateStatusTypes.AVAILABLE || |
239 | this.props.stores.app.updateStatus === this.props.stores.app.updateStatusTypes.DOWNLOADED) | 240 | this.props.stores.app.updateStatus === this.props.stores.app.updateStatusTypes.DOWNLOADED || |
240 | ) && ( | 241 | this.props.showServicesUpdatedInfoBar) && ( |
241 | <span className="update-available">•</span> | 242 | <span className="update-available">•</span> |
242 | ) | 243 | ) |
243 | } | 244 | } |
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index b58956f51..763f4e8a7 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -137,9 +137,9 @@ class SettingsNavigation extends Component { | |||
137 | activeClassName="is-active" | 137 | activeClassName="is-active" |
138 | > | 138 | > |
139 | {intl.formatMessage(globalMessages.settings)} | 139 | {intl.formatMessage(globalMessages.settings)} |
140 | {stores.settings.app.automaticUpdates && | 140 | {stores.settings.app.automaticUpdates && (stores.ui.showServicesUpdatedInfoBar || |
141 | (stores.app.updateStatus === stores.app.updateStatusTypes.AVAILABLE || | 141 | (stores.app.updateStatus === stores.app.updateStatusTypes.AVAILABLE || |
142 | stores.app.updateStatus === stores.app.updateStatusTypes.DOWNLOADED) && ( | 142 | stores.app.updateStatus === stores.app.updateStatusTypes.DOWNLOADED)) && ( |
143 | <span className="update-available">•</span> | 143 | <span className="update-available">•</span> |
144 | )} | 144 | )} |
145 | </Link> | 145 | </Link> |
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index b358a395f..c3ff5cc1c 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -243,6 +243,7 @@ class EditSettingsForm extends Component { | |||
243 | noUpdateAvailable, | 243 | noUpdateAvailable, |
244 | updateIsReadyToInstall, | 244 | updateIsReadyToInstall, |
245 | updateFailed, | 245 | updateFailed, |
246 | showServicesUpdatedInfoBar, | ||
246 | isClearingAllCache, | 247 | isClearingAllCache, |
247 | onClearAllCache, | 248 | onClearAllCache, |
248 | getCacheSize, | 249 | getCacheSize, |
@@ -378,7 +379,7 @@ class EditSettingsForm extends Component { | |||
378 | }} | 379 | }} |
379 | > | 380 | > |
380 | {intl.formatMessage(messages.headlineUpdates)} | 381 | {intl.formatMessage(messages.headlineUpdates)} |
381 | {automaticUpdates && (updateIsReadyToInstall || isUpdateAvailable) && ( | 382 | {automaticUpdates && (updateIsReadyToInstall || isUpdateAvailable || showServicesUpdatedInfoBar) && ( |
382 | <span className="update-available">•</span> | 383 | <span className="update-available">•</span> |
383 | )} | 384 | )} |
384 | </h2>} | 385 | </h2>} |
diff --git a/src/containers/layout/AppLayoutContainer.js b/src/containers/layout/AppLayoutContainer.js index 4bcd17409..45dd7d75d 100644 --- a/src/containers/layout/AppLayoutContainer.js +++ b/src/containers/layout/AppLayoutContainer.js | |||
@@ -127,6 +127,7 @@ class AppLayoutContainer extends Component { | |||
127 | toggleMuteApp={toggleMuteApp} | 127 | toggleMuteApp={toggleMuteApp} |
128 | toggleWorkspaceDrawer={workspaceActions.toggleWorkspaceDrawer} | 128 | toggleWorkspaceDrawer={workspaceActions.toggleWorkspaceDrawer} |
129 | isWorkspaceDrawerOpen={workspaceStore.isWorkspaceDrawerOpen} | 129 | isWorkspaceDrawerOpen={workspaceStore.isWorkspaceDrawerOpen} |
130 | showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar} | ||
130 | showMessageBadgeWhenMutedSetting={ | 131 | showMessageBadgeWhenMutedSetting={ |
131 | settings.all.app.showMessageBadgeWhenMuted | 132 | settings.all.app.showMessageBadgeWhenMuted |
132 | } | 133 | } |
@@ -165,7 +166,6 @@ class AppLayoutContainer extends Component { | |||
165 | sidebar={sidebar} | 166 | sidebar={sidebar} |
166 | workspacesDrawer={workspacesDrawer} | 167 | workspacesDrawer={workspacesDrawer} |
167 | services={servicesContainer} | 168 | services={servicesContainer} |
168 | reloadServicesAfterUpdate={() => window.location.reload()} | ||
169 | installAppUpdate={installUpdate} | 169 | installAppUpdate={installUpdate} |
170 | globalError={globalError.error} | 170 | globalError={globalError.error} |
171 | showRequiredRequestsError={requests.showRequiredRequestsError} | 171 | showRequiredRequestsError={requests.showRequiredRequestsError} |
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 78a0eac6f..eff5f20ff 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -728,6 +728,7 @@ class EditSettingsScreen extends Component { | |||
728 | noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE} | 728 | noUpdateAvailable={updateStatus === updateStatusTypes.NOT_AVAILABLE} |
729 | updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED} | 729 | updateIsReadyToInstall={updateStatus === updateStatusTypes.DOWNLOADED} |
730 | updateFailed={updateStatus === updateStatusTypes.FAILED} | 730 | updateFailed={updateStatus === updateStatusTypes.FAILED} |
731 | showServicesUpdatedInfoBar={this.props.stores.ui.showServicesUpdatedInfoBar} | ||
731 | onSubmit={d => this.onSubmit(d)} | 732 | onSubmit={d => this.onSubmit(d)} |
732 | getCacheSize={() => app.cacheSize} | 733 | getCacheSize={() => app.cacheSize} |
733 | isClearingAllCache={isClearingAllCache} | 734 | isClearingAllCache={isClearingAllCache} |
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index cdb8586ca..fd7c58dfc 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -388,8 +388,9 @@ export default class AppStore extends Store { | |||
388 | ipcRenderer.send('autoUpdate', { | 388 | ipcRenderer.send('autoUpdate', { |
389 | action: 'check', | 389 | action: 'check', |
390 | }); | 390 | }); |
391 | 391 | if (this.stores.settings.app.automaticUpdates) { | |
392 | this.actions.recipe.update(); | 392 | this.actions.recipe.update(); |
393 | } | ||
393 | } | 394 | } |
394 | } | 395 | } |
395 | 396 | ||