Refresh state on pack install

This commit is contained in:
the1812 2021-12-13 23:37:09 +08:00
parent de52d9152d
commit 2e2a90c568
2 changed files with 8 additions and 0 deletions

View File

@ -44,7 +44,9 @@
<RegistryItem
v-for="item of filteredList"
:key="item.name"
ref="items"
:item="item"
@refresh="checkInstalled"
/>
<!-- <RegistryItem
v-for="item of packList"
@ -161,6 +163,9 @@ export default Vue.extend({
this.loading = false
}
},
checkInstalled() {
this.$refs.items?.forEach((item: any) => item.checkInstalled())
},
},
})
</script>

View File

@ -131,6 +131,9 @@ export default Vue.extend({
urls.map(async url => installFeature(url)),
)
this.checkInstalled()
if (this.item.type === 'pack') {
this.$emit('refresh')
}
} catch (error) {
logError(error)
} finally {