diff options
author | 2023-05-27 18:48:38 +0530 | |
---|---|---|
committer | 2023-05-27 18:48:38 +0530 | |
commit | eaa8e80efadc55d42462af0a5381f2552acc3c88 (patch) | |
tree | b54868af925e2db3fc6d5444475cd14bd3255f1c /src/containers/settings | |
parent | update react version to 18.2.0 and it related changes (diff) | |
download | ferdium-app-eaa8e80efadc55d42462af0a5381f2552acc3c88.tar.gz ferdium-app-eaa8e80efadc55d42462af0a5381f2552acc3c88.tar.zst ferdium-app-eaa8e80efadc55d42462af0a5381f2552acc3c88.zip |
Expose "Clear service cache" in the service settings screen and the sidebar context menu for individual services (#1053)
Diffstat (limited to 'src/containers/settings')
-rw-r--r-- | src/containers/settings/EditServiceScreen.tsx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/containers/settings/EditServiceScreen.tsx b/src/containers/settings/EditServiceScreen.tsx index 0a079c608..3b9d3ee43 100644 --- a/src/containers/settings/EditServiceScreen.tsx +++ b/src/containers/settings/EditServiceScreen.tsx | |||
@@ -468,6 +468,16 @@ class EditServiceScreen extends Component<IProps> { | |||
468 | } | 468 | } |
469 | } | 469 | } |
470 | 470 | ||
471 | clearCache(): void { | ||
472 | const { action } = this.props.params; | ||
473 | |||
474 | if (action === 'edit') { | ||
475 | const { clearCache } = this.props.actions.service; | ||
476 | const { activeSettings: service } = this.props.stores.services; | ||
477 | clearCache({ serviceId: service?.id }); | ||
478 | } | ||
479 | } | ||
480 | |||
471 | openRecipeFile(file: any): void { | 481 | openRecipeFile(file: any): void { |
472 | const { openRecipeFile } = this.props.actions.service; | 482 | const { openRecipeFile } = this.props.actions.service; |
473 | const { action } = this.props.params; | 483 | const { action } = this.props.params; |
@@ -534,6 +544,7 @@ class EditServiceScreen extends Component<IProps> { | |||
534 | isDeleting={services.deleteServiceRequest.isExecuting} | 544 | isDeleting={services.deleteServiceRequest.isExecuting} |
535 | onSubmit={d => this.onSubmit(d)} | 545 | onSubmit={d => this.onSubmit(d)} |
536 | onDelete={() => this.deleteService()} | 546 | onDelete={() => this.deleteService()} |
547 | onClearCache={() => this.clearCache()} | ||
537 | openRecipeFile={file => this.openRecipeFile(file)} | 548 | openRecipeFile={file => this.openRecipeFile(file)} |
538 | isProxyFeatureEnabled={proxyFeature.isEnabled} | 549 | isProxyFeatureEnabled={proxyFeature.isEnabled} |
539 | /> | 550 | /> |