fix: 🐛 do not show add if already subscribed
All checks were successful
repod / xml (push) Successful in 16s
repod / php (push) Successful in 42s
repod / nodejs (push) Successful in 1m18s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-05-30 07:31:23 +00:00
parent 7a4bbd8e47
commit 691ee72ac5

View File

@ -19,7 +19,7 @@
</template> </template>
<template #actions> <template #actions>
<NcActionButton <NcActionButton
v-if="!isSubscribed" v-if="!isSubscribed(feed.link)"
:name="t('repod', 'Subscribe')" :name="t('repod', 'Subscribe')"
:title="t('repod', 'Subscribe')" :title="t('repod', 'Subscribe')"
@click="addSubscription(feed.link)"> @click="addSubscription(feed.link)">
@ -89,6 +89,9 @@ export default {
this.$store.dispatch('subscriptions/fetch') this.$store.dispatch('subscriptions/fetch')
}, },
isSubscribed(url) {
return this.$store.state.subscriptions.subscriptions.includes(url)
},
search: debounce(async function value() { search: debounce(async function value() {
try { try {
this.loading = true this.loading = true