diff options
Diffstat (limited to 'src/components/settings')
-rw-r--r-- | src/components/settings/services/EditServiceForm.tsx | 12 | ||||
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.tsx | 6 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/components/settings/services/EditServiceForm.tsx b/src/components/settings/services/EditServiceForm.tsx index c04a53b50..520cb3c46 100644 --- a/src/components/settings/services/EditServiceForm.tsx +++ b/src/components/settings/services/EditServiceForm.tsx | |||
@@ -156,6 +156,7 @@ interface IProps extends WrappedComponentProps { | |||
156 | form: Form; | 156 | form: Form; |
157 | onSubmit: (...args: any[]) => void; | 157 | onSubmit: (...args: any[]) => void; |
158 | onDelete: () => void; | 158 | onDelete: () => void; |
159 | onClearCache: () => void; | ||
159 | openRecipeFile: (recipeFile: string) => void; | 160 | openRecipeFile: (recipeFile: string) => void; |
160 | isSaving: boolean; | 161 | isSaving: boolean; |
161 | isDeleting: boolean; | 162 | isDeleting: boolean; |
@@ -223,6 +224,7 @@ class EditServiceForm extends Component<IProps, IState> { | |||
223 | isSaving, | 224 | isSaving, |
224 | isDeleting, | 225 | isDeleting, |
225 | onDelete, | 226 | onDelete, |
227 | onClearCache, | ||
226 | openRecipeFile, | 228 | openRecipeFile, |
227 | isProxyFeatureEnabled, | 229 | isProxyFeatureEnabled, |
228 | intl, | 230 | intl, |
@@ -246,6 +248,15 @@ class EditServiceForm extends Component<IProps, IState> { | |||
246 | /> | 248 | /> |
247 | ); | 249 | ); |
248 | 250 | ||
251 | const clearCacheButton = ( | ||
252 | <Button | ||
253 | buttonType="secondary" | ||
254 | label={intl.formatMessage(globalMessages.clearCache)} | ||
255 | className="settings__open-settings-cache-button" | ||
256 | onClick={onClearCache} | ||
257 | /> | ||
258 | ); | ||
259 | |||
249 | let activeTabIndex = 0; | 260 | let activeTabIndex = 0; |
250 | if (recipe.hasHostedOption && service?.team) { | 261 | if (recipe.hasHostedOption && service?.team) { |
251 | activeTabIndex = 1; | 262 | activeTabIndex = 1; |
@@ -502,6 +513,7 @@ class EditServiceForm extends Component<IProps, IState> { | |||
502 | <div className="settings__controls"> | 513 | <div className="settings__controls"> |
503 | {/* Delete Button */} | 514 | {/* Delete Button */} |
504 | <div>{action === 'edit' && deleteButton}</div> | 515 | <div>{action === 'edit' && deleteButton}</div> |
516 | <div>{action === 'edit' && clearCacheButton}</div> | ||
505 | 517 | ||
506 | {/* Save Button */} | 518 | {/* Save Button */} |
507 | {isSaving || isValidatingCustomUrl ? ( | 519 | {isSaving || isValidatingCustomUrl ? ( |
diff --git a/src/components/settings/settings/EditSettingsForm.tsx b/src/components/settings/settings/EditSettingsForm.tsx index 49798dd92..39c25f529 100644 --- a/src/components/settings/settings/EditSettingsForm.tsx +++ b/src/components/settings/settings/EditSettingsForm.tsx | |||
@@ -189,10 +189,6 @@ const messages = defineMessages({ | |||
189 | id: 'settings.app.cacheNotCleared', | 189 | id: 'settings.app.cacheNotCleared', |
190 | defaultMessage: "Couldn't clear all cache", | 190 | defaultMessage: "Couldn't clear all cache", |
191 | }, | 191 | }, |
192 | buttonClearAllCache: { | ||
193 | id: 'settings.app.buttonClearAllCache', | ||
194 | defaultMessage: 'Clear cache', | ||
195 | }, | ||
196 | subheadlineFerdiumProfile: { | 192 | subheadlineFerdiumProfile: { |
197 | id: 'settings.app.subheadlineFerdiumProfile', | 193 | id: 'settings.app.subheadlineFerdiumProfile', |
198 | defaultMessage: 'Ferdium Profile', | 194 | defaultMessage: 'Ferdium Profile', |
@@ -974,7 +970,7 @@ class EditSettingsForm extends Component<IProps, IState> { | |||
974 | <div className="settings__open-settings-cache-container"> | 970 | <div className="settings__open-settings-cache-container"> |
975 | <Button | 971 | <Button |
976 | buttonType="secondary" | 972 | buttonType="secondary" |
977 | label={intl.formatMessage(messages.buttonClearAllCache)} | 973 | label={intl.formatMessage(globalMessages.clearCache)} |
978 | className="settings__open-settings-cache-button" | 974 | className="settings__open-settings-cache-button" |
979 | onClick={() => { | 975 | onClick={() => { |
980 | onClearAllCache(); | 976 | onClearAllCache(); |