From a5bc4e6baf4708ccb07055b78412bb5dc68d1497 Mon Sep 17 00:00:00 2001 From: PKC278 <52959804+PKC278@users.noreply.github.com> Date: Wed, 17 Jun 2026 12:03:20 +0800 Subject: [PATCH] fix: restore search filter chip colors (#493) --- .../dialog/TorrentAllFiltersDialog.vue | 25 ++++++++++++++++ .../dialog/TorrentMoreSourcesDialog.vue | 20 +++++++++++++ .../dialog/TorrentSingleFilterDialog.vue | 29 ++++++++++++++++++- src/components/filter/TorrentFilterBar.vue | 8 ++--- 4 files changed, 76 insertions(+), 6 deletions(-) diff --git a/src/components/dialog/TorrentAllFiltersDialog.vue b/src/components/dialog/TorrentAllFiltersDialog.vue index 27fb8fe3..62d7ab66 100644 --- a/src/components/dialog/TorrentAllFiltersDialog.vue +++ b/src/components/dialog/TorrentAllFiltersDialog.vue @@ -141,4 +141,29 @@ function updateFilter(key: string, values: string[]) { gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); } + +.filter-options { + display: flex; + flex-wrap: wrap; +} + +.filter-chip { + border: 1px solid rgba(var(--v-theme-primary), 0.2); + margin: 4px; + background-color: rgba(var(--v-theme-primary), 0.1) !important; + color: rgba(var(--v-theme-on-surface), 0.9) !important; + font-weight: 500; + transition: all 0.2s ease; +} + +.filter-chip:hover { + background-color: rgba(var(--v-theme-primary), 0.15) !important; +} + +.filter-chip.v-chip--selected { + background-color: rgba(var(--v-theme-primary), 0.85) !important; + box-shadow: 0 2px 4px rgba(var(--v-theme-primary), 0.3); + color: rgb(var(--v-theme-on-primary)) !important; + font-weight: 600; +} diff --git a/src/components/dialog/TorrentMoreSourcesDialog.vue b/src/components/dialog/TorrentMoreSourcesDialog.vue index 52fd1e5d..183f33cd 100644 --- a/src/components/dialog/TorrentMoreSourcesDialog.vue +++ b/src/components/dialog/TorrentMoreSourcesDialog.vue @@ -142,4 +142,24 @@ function handleDetail(item: Context) { max-block-size: 60vh; overflow-y: auto; } + +.chip-season { + background-color: #3f51b5; + color: white; +} + +.chip-free { + background-color: #4caf50; + color: white; +} + +.chip-discount { + background-color: #ff5722; + color: white; +} + +.chip-bonus { + background-color: #9c27b0; + color: white; +} diff --git a/src/components/dialog/TorrentSingleFilterDialog.vue b/src/components/dialog/TorrentSingleFilterDialog.vue index 9c91508c..f1b5d5bc 100644 --- a/src/components/dialog/TorrentSingleFilterDialog.vue +++ b/src/components/dialog/TorrentSingleFilterDialog.vue @@ -85,7 +85,7 @@ function updateFilter(values: string[]) { @update:model-value="updateFilter" > + + diff --git a/src/components/filter/TorrentFilterBar.vue b/src/components/filter/TorrentFilterBar.vue index 9c631cfb..41911735 100644 --- a/src/components/filter/TorrentFilterBar.vue +++ b/src/components/filter/TorrentFilterBar.vue @@ -372,7 +372,7 @@ onMounted(() => { :key="key" variant="tonal" size="small" - :color="filterForm[key].length > 0 ? 'primary' : undefined" + color="primary" :prepend-icon="getFilterIcon(key)" class="filter-btn" rounded="pill" @@ -555,7 +555,7 @@ onMounted(() => { v-for="(title, key) in filterTitles" v-show="filterOptions[key].length > 0" :key="key" - variant="text" + variant="tonal" color="primary" class="filter-btn-mobile" @click="toggleFilterMenu(key)" @@ -575,7 +575,7 @@ onMounted(() => { - + {{ t('torrent.allFilters') }} @@ -665,7 +665,6 @@ onMounted(() => { .filter-btn { min-inline-size: 0; - background: rgba(var(--v-theme-surface-variant), 0.1); transition: opacity 0.2s; } @@ -733,7 +732,6 @@ onMounted(() => { justify-content: center; border: 1px solid rgba(var(--v-theme-on-surface), 0.08); border-radius: 8px; - background-color: rgba(var(--v-theme-surface-variant), 0.08); block-size: auto; min-block-size: 48px; padding-block: 4px;