mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-06 00:01:33 +08:00
Add sorting options to subscribe views and locales
Co-authored-by: jxxghp <jxxghp@qq.com>
This commit is contained in:
@@ -40,6 +40,7 @@ const filterParams = reactive({
|
||||
min_rating: 0,
|
||||
max_rating: 10,
|
||||
min_sub: 1,
|
||||
sort_type: 'count', // 默认按热度排序
|
||||
})
|
||||
|
||||
// 当前Key(用于重新加载数据)
|
||||
@@ -123,6 +124,9 @@ function getParams() {
|
||||
if (filterParams.min_sub > 1) {
|
||||
params.min_sub = filterParams.min_sub
|
||||
}
|
||||
if (filterParams.sort_type) {
|
||||
params.sort_type = filterParams.sort_type
|
||||
}
|
||||
|
||||
return params
|
||||
}
|
||||
@@ -233,7 +237,7 @@ async function fetchData({ done }: { done: any }) {
|
||||
</VSlider>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-start align-center">
|
||||
<div class="flex justify-start align-center mb-3">
|
||||
<div class="mr-5">
|
||||
<VLabel>{{ t('subscribe.minSubscribers') }}</VLabel>
|
||||
</div>
|
||||
@@ -248,6 +252,24 @@ async function fetchData({ done }: { done: any }) {
|
||||
style="width: 120px;"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-start align-center">
|
||||
<div class="mr-5">
|
||||
<VLabel>{{ t('tmdb.sort') }}</VLabel>
|
||||
</div>
|
||||
<VSelect
|
||||
v-model="filterParams.sort_type"
|
||||
:items="[
|
||||
{ title: t('tmdb.sortType.time'), value: 'time' },
|
||||
{ title: t('tmdb.sortType.count'), value: 'count' },
|
||||
{ title: t('tmdb.sortType.rating'), value: 'rating' }
|
||||
]"
|
||||
variant="outlined"
|
||||
density="compact"
|
||||
hide-details
|
||||
style="width: 150px;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
|
||||
|
||||
@@ -33,6 +33,7 @@ const filterParams = reactive({
|
||||
genre_id: '',
|
||||
min_rating: 0,
|
||||
max_rating: 10,
|
||||
sort_type: 'time', // 默认按时间排序
|
||||
})
|
||||
|
||||
// 当前Key(用于重新加载数据)
|
||||
@@ -137,6 +138,9 @@ function getParams() {
|
||||
if (filterParams.max_rating < 10) {
|
||||
params.max_rating = filterParams.max_rating
|
||||
}
|
||||
if (filterParams.sort_type) {
|
||||
params.sort_type = filterParams.sort_type
|
||||
}
|
||||
|
||||
return params
|
||||
}
|
||||
@@ -232,7 +236,7 @@ function removeData(id: number) {
|
||||
</VChipGroup>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-start align-center">
|
||||
<div class="flex justify-start align-center mb-3">
|
||||
<div class="mr-5">
|
||||
<VLabel>{{ t('tmdb.rating') }}</VLabel>
|
||||
</div>
|
||||
@@ -251,6 +255,24 @@ function removeData(id: number) {
|
||||
</template>
|
||||
</VSlider>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-start align-center">
|
||||
<div class="mr-5">
|
||||
<VLabel>{{ t('tmdb.sort') }}</VLabel>
|
||||
</div>
|
||||
<VSelect
|
||||
v-model="filterParams.sort_type"
|
||||
:items="[
|
||||
{ title: t('tmdb.sortType.time'), value: 'time' },
|
||||
{ title: t('tmdb.sortType.count'), value: 'count' },
|
||||
{ title: t('tmdb.sortType.rating'), value: 'rating' }
|
||||
]"
|
||||
variant="outlined"
|
||||
density="compact"
|
||||
hide-details
|
||||
style="width: 150px;"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<VPageContentTitle v-if="keyword" :title="`${t('common.search')}:${keyword}`" />
|
||||
|
||||
Reference in New Issue
Block a user