mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-02-26 04:10:52 +03:00
perf: bring back active filter #1280
This commit is contained in:
parent
6eb2c15e20
commit
afe4fa5784
1 changed files with 6 additions and 1 deletions
|
@ -19,6 +19,10 @@ function selectAllStatuses() {
|
||||||
statusFilter.value = []
|
statusFilter.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function selectActive() {
|
||||||
|
statusFilter.value = [TorrentState.META_DL, TorrentState.DOWNLOADING, TorrentState.FORCED_DL, TorrentState.UPLOADING, TorrentState.FORCED_UP, TorrentState.MOVING]
|
||||||
|
}
|
||||||
|
|
||||||
function selectAllCategories() {
|
function selectAllCategories() {
|
||||||
categoryFilter.value = []
|
categoryFilter.value = []
|
||||||
}
|
}
|
||||||
|
@ -40,7 +44,7 @@ function selectAllTrackers() {
|
||||||
</v-list-item-title>
|
</v-list-item-title>
|
||||||
<v-select
|
<v-select
|
||||||
v-model="statusFilter"
|
v-model="statusFilter"
|
||||||
:items="statuses"
|
:items="statuses.sort((a, b) => a.title.localeCompare(b.title))"
|
||||||
:placeholder="t('navbar.side.filters.disabled')"
|
:placeholder="t('navbar.side.filters.disabled')"
|
||||||
bg-color="secondary"
|
bg-color="secondary"
|
||||||
class="text-accent pt-1"
|
class="text-accent pt-1"
|
||||||
|
@ -50,6 +54,7 @@ function selectAllTrackers() {
|
||||||
variant="solo">
|
variant="solo">
|
||||||
<template v-slot:prepend-item>
|
<template v-slot:prepend-item>
|
||||||
<v-list-item :title="$t('common.disable')" @click="selectAllStatuses" />
|
<v-list-item :title="$t('common.disable')" @click="selectAllStatuses" />
|
||||||
|
<v-list-item :title="$t('common.active')" @click="selectActive" />
|
||||||
<v-divider />
|
<v-divider />
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:selection="{ item, index }">
|
<template v-slot:selection="{ item, index }">
|
||||||
|
|
Loading…
Add table
Reference in a new issue