perf: bring back active filter #1280

This commit is contained in:
Daan Wijns 2024-01-13 09:58:19 +01:00
parent 6eb2c15e20
commit afe4fa5784

View file

@ -19,6 +19,10 @@ function selectAllStatuses() {
statusFilter.value = []
}
function selectActive() {
statusFilter.value = [TorrentState.META_DL, TorrentState.DOWNLOADING, TorrentState.FORCED_DL, TorrentState.UPLOADING, TorrentState.FORCED_UP, TorrentState.MOVING]
}
function selectAllCategories() {
categoryFilter.value = []
}
@ -40,7 +44,7 @@ function selectAllTrackers() {
</v-list-item-title>
<v-select
v-model="statusFilter"
:items="statuses"
:items="statuses.sort((a, b) => a.title.localeCompare(b.title))"
:placeholder="t('navbar.side.filters.disabled')"
bg-color="secondary"
class="text-accent pt-1"
@ -50,6 +54,7 @@ function selectAllTrackers() {
variant="solo">
<template v-slot:prepend-item>
<v-list-item :title="$t('common.disable')" @click="selectAllStatuses" />
<v-list-item :title="$t('common.active')" @click="selectActive" />
<v-divider />
</template>
<template v-slot:selection="{ item, index }">