Refactor: Move sort filter to top in subscribe views

Co-authored-by: jxxghp <jxxghp@qq.com>
This commit is contained in:
Cursor Agent
2025-09-16 04:25:38 +00:00
parent 4f6a11fd7c
commit d1a656db82
2 changed files with 64 additions and 64 deletions

View File

@@ -199,6 +199,38 @@ async function fetchData({ done }: { done: any }) {
<template>
<!-- 筛选器 -->
<div class="px-3 mb-4">
<div class="flex justify-start align-center mb-3">
<div class="mr-5">
<VLabel>{{ t('tmdb.sort') }}</VLabel>
</div>
<VChipGroup v-model="filterParams.sort_type">
<VChip
:color="filterParams.sort_type == 'time' ? 'primary' : ''"
filter
tile
value="time"
>
{{ t('tmdb.sortType.time') }}
</VChip>
<VChip
:color="filterParams.sort_type == 'count' ? 'primary' : ''"
filter
tile
value="count"
>
{{ t('tmdb.sortType.count') }}
</VChip>
<VChip
:color="filterParams.sort_type == 'rating' ? 'primary' : ''"
filter
tile
value="rating"
>
{{ t('tmdb.sortType.rating') }}
</VChip>
</VChipGroup>
</div>
<div class="flex justify-start align-center mb-3">
<div class="mr-5">
<VLabel>{{ t('tmdb.genre') }}</VLabel>
@@ -248,38 +280,6 @@ async function fetchData({ done }: { done: any }) {
/>
</div>
</div>
<div class="flex justify-start align-center">
<div class="mr-5">
<VLabel>{{ t('tmdb.sort') }}</VLabel>
</div>
<VChipGroup v-model="filterParams.sort_type">
<VChip
:color="filterParams.sort_type == 'time' ? 'primary' : ''"
filter
tile
value="time"
>
{{ t('tmdb.sortType.time') }}
</VChip>
<VChip
:color="filterParams.sort_type == 'count' ? 'primary' : ''"
filter
tile
value="count"
>
{{ t('tmdb.sortType.count') }}
</VChip>
<VChip
:color="filterParams.sort_type == 'rating' ? 'primary' : ''"
filter
tile
value="rating"
>
{{ t('tmdb.sortType.rating') }}
</VChip>
</VChipGroup>
</div>
</div>
<LoadingBanner v-if="!isRefreshed" class="mt-12" />

View File

@@ -218,6 +218,38 @@ function removeData(id: number) {
<template>
<!-- 筛选器 -->
<div class="px-3 mb-4">
<div class="flex justify-start align-center mb-3">
<div class="mr-5">
<VLabel>{{ t('tmdb.sort') }}</VLabel>
</div>
<VChipGroup v-model="filterParams.sort_type">
<VChip
:color="filterParams.sort_type == 'time' ? 'primary' : ''"
filter
tile
value="time"
>
{{ t('tmdb.sortType.time') }}
</VChip>
<VChip
:color="filterParams.sort_type == 'count' ? 'primary' : ''"
filter
tile
value="count"
>
{{ t('tmdb.sortType.count') }}
</VChip>
<VChip
:color="filterParams.sort_type == 'rating' ? 'primary' : ''"
filter
tile
value="rating"
>
{{ t('tmdb.sortType.rating') }}
</VChip>
</VChipGroup>
</div>
<div class="flex justify-start align-center mb-3">
<div class="mr-5">
<VLabel>{{ t('tmdb.genre') }}</VLabel>
@@ -255,38 +287,6 @@ function removeData(id: number) {
</template>
</VSlider>
</div>
<div class="flex justify-start align-center">
<div class="mr-5">
<VLabel>{{ t('tmdb.sort') }}</VLabel>
</div>
<VChipGroup v-model="filterParams.sort_type">
<VChip
:color="filterParams.sort_type == 'time' ? 'primary' : ''"
filter
tile
value="time"
>
{{ t('tmdb.sortType.time') }}
</VChip>
<VChip
:color="filterParams.sort_type == 'count' ? 'primary' : ''"
filter
tile
value="count"
>
{{ t('tmdb.sortType.count') }}
</VChip>
<VChip
:color="filterParams.sort_type == 'rating' ? 'primary' : ''"
filter
tile
value="rating"
>
{{ t('tmdb.sortType.rating') }}
</VChip>
</VChipGroup>
</div>
</div>
<VPageContentTitle v-if="keyword" :title="`${t('common.search')}${keyword}`" />