chore: fix typo, updating

This commit is contained in:
kunish 2023-09-05 16:19:14 +08:00
parent 2caf0c41dd
commit 9b2e9162cd
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -21,13 +21,13 @@ export default () => {
onMount(updateRules) onMount(updateRules)
const { map: updateingMap, setWithCallback: setUpdateingMap } = const { map: updatingMap, setWithCallback: setUpdatingMap } =
useStringBooleanMap() useStringBooleanMap()
const [allProviderIsUpdating, setAllProviderIsUpdating] = createSignal(false) const [allProviderIsUpdating, setAllProviderIsUpdating] = createSignal(false)
const onUpdateProviderClick = (e: MouseEvent, name: string) => { const onUpdateProviderClick = (e: MouseEvent, name: string) => {
e.stopPropagation() e.stopPropagation()
setUpdateingMap(name, async () => await updateRuleProviderByName(name)) void setUpdatingMap(name, () => updateRuleProviderByName(name))
} }
const onUpdateAllProviderClick = async (e: MouseEvent) => { const onUpdateAllProviderClick = async (e: MouseEvent) => {
@ -95,7 +95,7 @@ export default () => {
> >
<IconReload <IconReload
class={twMerge( class={twMerge(
updateingMap()[rulesProvider.name] && 'animate-spin', updatingMap()[rulesProvider.name] && 'animate-spin',
)} )}
/> />
</Button> </Button>