Migrate to vue3 (fix #126) #127

Merged
Xefir merged 32 commits from vue3 into main 2024-08-17 12:24:28 +00:00
Showing only changes of commit 5db93914d2 - Show all commits

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']),