fix: 🐛 fix filters
This commit is contained in:
parent
68ada2b0e0
commit
5db93914d2
@ -5,31 +5,30 @@
|
||||
:name="t('repod', 'Filtering episodes')">
|
||||
<template #actions>
|
||||
<NcActionCheckbox
|
||||
:checked="all"
|
||||
:disabled="all"
|
||||
@update:checked="
|
||||
(checked) =>
|
||||
:model-value="all"
|
||||
@change="
|
||||
setFilters({
|
||||
listened: checked,
|
||||
listening: checked,
|
||||
unlistened: checked,
|
||||
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']),
|
||||
|
Loading…
Reference in New Issue
Block a user