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