fix: 🐛 fix filters
All checks were successful
repod / xml (push) Successful in 16s
repod / php (push) Successful in 1m11s
repod / nodejs (push) Successful in 1m10s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-08-15 17:07:15 +02:00
parent 68ada2b0e0
commit 5db93914d2

View File

@ -5,31 +5,30 @@
:name="t('repod', 'Filtering episodes')"> :name="t('repod', 'Filtering episodes')">
<template #actions> <template #actions>
<NcActionCheckbox <NcActionCheckbox
:checked="all"
:disabled="all" :disabled="all"
@update:checked=" :model-value="all"
(checked) => @change="
setFilters({ setFilters({
listened: checked, listened: true,
listening: checked, listening: true,
unlistened: checked, unlistened: true,
}) })
"> ">
{{ t('repod', 'Show all') }} {{ t('repod', 'Show all') }}
</NcActionCheckbox> </NcActionCheckbox>
<NcActionCheckbox <NcActionCheckbox
:checked="filters.listened" :model-value="filters.listened"
@update:checked="(checked) => setFilters({ listened: checked })"> @change="setFilters({ listened: !filters.listened })">
{{ t('repod', 'Listened') }} {{ t('repod', 'Listened') }}
</NcActionCheckbox> </NcActionCheckbox>
<NcActionCheckbox <NcActionCheckbox
:checked="filters.listening" :model-value="filters.listening"
@update:checked="(checked) => setFilters({ listening: checked })"> @change="setFilters({ listening: !filters.listening })">
{{ t('repod', 'Listening') }} {{ t('repod', 'Listening') }}
</NcActionCheckbox> </NcActionCheckbox>
<NcActionCheckbox <NcActionCheckbox
:checked="filters.unlistened" :model-value="filters.unlistened"
@update:checked="(checked) => setFilters({ unlistened: checked })"> @change="setFilters({ unlistened: !filters.unlistened })">
{{ t('repod', 'Unlistened') }} {{ t('repod', 'Unlistened') }}
</NcActionCheckbox> </NcActionCheckbox>
</template> </template>
@ -57,6 +56,13 @@ export default {
}, },
computed: { computed: {
...mapState(useSettings, ['filters']), ...mapState(useSettings, ['filters']),
all() {
return (
this.filters.listened &&
this.filters.listening &&
this.filters.unlistened
)
},
}, },
methods: { methods: {
...mapActions(useSettings, ['setFilters']), ...mapActions(useSettings, ['setFilters']),