mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-22 00:39:43 +08:00
更新缓存版本至v13
This commit is contained in:
@@ -2744,9 +2744,9 @@ export default {
|
||||
firstAirDateAsc: 'First Air Date Ascending',
|
||||
voteAverageDesc: 'Vote Average Descending',
|
||||
voteAverageAsc: 'Vote Average Ascending',
|
||||
time: 'Sort by Time',
|
||||
count: 'Sort by Popularity',
|
||||
rating: 'Sort by Rating',
|
||||
time: 'Latest',
|
||||
count: 'Popular',
|
||||
rating: 'Rating',
|
||||
},
|
||||
genreType: {
|
||||
action: 'Action',
|
||||
|
||||
@@ -2712,9 +2712,9 @@ export default {
|
||||
firstAirDateAsc: '首播日期升序',
|
||||
voteAverageDesc: '评分降序',
|
||||
voteAverageAsc: '评分升序',
|
||||
time: '按时间排序',
|
||||
count: '按热度排序',
|
||||
rating: '按评分排序',
|
||||
time: '最新',
|
||||
count: '热门',
|
||||
rating: '评分',
|
||||
},
|
||||
genreType: {
|
||||
action: '动作',
|
||||
|
||||
@@ -2698,9 +2698,9 @@ export default {
|
||||
firstAirDateAsc: '首播日期升序',
|
||||
voteAverageDesc: '評分降序',
|
||||
voteAverageAsc: '評分升序',
|
||||
time: '按時間排序',
|
||||
count: '按熱度排序',
|
||||
rating: '按評分排序',
|
||||
time: '最新',
|
||||
count: '熱門',
|
||||
rating: '評分',
|
||||
},
|
||||
genreType: {
|
||||
action: '動作',
|
||||
|
||||
@@ -6,7 +6,7 @@ declare let self: ServiceWorkerGlobalScope & {
|
||||
}
|
||||
|
||||
// 缓存版本控制
|
||||
const CACHE_VERSION = 'v12'
|
||||
const CACHE_VERSION = 'v13'
|
||||
const CACHE_NAMES = {
|
||||
appShell: `app-shell-${CACHE_VERSION}`,
|
||||
static: `static-resources-${CACHE_VERSION}`,
|
||||
|
||||
@@ -95,13 +95,17 @@ const currentGenreDict = computed(() => {
|
||||
})
|
||||
|
||||
// 监听筛选参数变化
|
||||
watch(filterParams, () => {
|
||||
// 重置数据
|
||||
dataList.value = []
|
||||
page.value = 1
|
||||
isRefreshed.value = false
|
||||
currentKey.value++
|
||||
}, { deep: true })
|
||||
watch(
|
||||
filterParams,
|
||||
() => {
|
||||
// 重置数据
|
||||
dataList.value = []
|
||||
page.value = 1
|
||||
isRefreshed.value = false
|
||||
currentKey.value++
|
||||
},
|
||||
{ deep: true },
|
||||
)
|
||||
|
||||
// 拼装参数
|
||||
function getParams() {
|
||||
@@ -110,7 +114,7 @@ function getParams() {
|
||||
page: page.value,
|
||||
count: 30,
|
||||
}
|
||||
|
||||
|
||||
// 添加筛选参数
|
||||
if (filterParams.genre_id) {
|
||||
params.genre_id = parseInt(filterParams.genre_id)
|
||||
@@ -127,7 +131,7 @@ function getParams() {
|
||||
if (filterParams.sort_type) {
|
||||
params.sort_type = filterParams.sort_type
|
||||
}
|
||||
|
||||
|
||||
return params
|
||||
}
|
||||
|
||||
@@ -204,33 +208,18 @@ async function fetchData({ done }: { done: any }) {
|
||||
<VLabel>{{ t('tmdb.sort') }}</VLabel>
|
||||
</div>
|
||||
<VChipGroup v-model="filterParams.sort_type">
|
||||
<VChip
|
||||
:color="filterParams.sort_type == 'time' ? 'primary' : ''"
|
||||
filter
|
||||
tile
|
||||
value="time"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<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,42 +237,33 @@ async function fetchData({ done }: { done: any }) {
|
||||
</VChip>
|
||||
</VChipGroup>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex justify-start align-center mb-3">
|
||||
<div class="mr-5">
|
||||
<VLabel>{{ t('tmdb.rating') }} & {{ t('subscribe.minSubscribers') }}</VLabel>
|
||||
</div>
|
||||
<div class="flex align-center">
|
||||
<VSlider
|
||||
v-model="filterParams.min_rating"
|
||||
thumb-label
|
||||
max="10"
|
||||
min="0"
|
||||
:step="1"
|
||||
class="align-center"
|
||||
hide-details
|
||||
style="width: 200px;"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<span class="ml-2 text-body-2">- 10</span>
|
||||
</template>
|
||||
</VSlider>
|
||||
<VTextField
|
||||
v-model="filterParams.min_sub"
|
||||
variant="outlined"
|
||||
density="compact"
|
||||
type="number"
|
||||
hide-details
|
||||
single-line
|
||||
min="1"
|
||||
style="width: 120px; margin-left: 20px;"
|
||||
/>
|
||||
<VLabel>{{ t('tmdb.rating') }}</VLabel>
|
||||
</div>
|
||||
<VSlider
|
||||
v-model="filterParams.min_rating"
|
||||
thumb-label
|
||||
max="10"
|
||||
min="0"
|
||||
:step="1"
|
||||
class="align-center"
|
||||
hide-details
|
||||
>
|
||||
</VSlider>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
|
||||
<VInfiniteScroll mode="intersect" side="end" :items="dataList" class="overflow-visible px-2" @load="fetchData" :key="currentKey">
|
||||
<VInfiniteScroll
|
||||
mode="intersect"
|
||||
side="end"
|
||||
:items="dataList"
|
||||
class="overflow-visible px-2"
|
||||
@load="fetchData"
|
||||
:key="currentKey"
|
||||
>
|
||||
<template #loading />
|
||||
<template #empty />
|
||||
<div v-if="dataList.length > 0" class="grid gap-4 grid-media-card" tabindex="0">
|
||||
|
||||
@@ -102,13 +102,17 @@ watch(
|
||||
)
|
||||
|
||||
// 监听筛选参数变化
|
||||
watch(filterParams, () => {
|
||||
// 重置数据
|
||||
dataList.value = []
|
||||
page.value = 1
|
||||
isRefreshed.value = false
|
||||
currentKey.value++
|
||||
}, { deep: true })
|
||||
watch(
|
||||
filterParams,
|
||||
() => {
|
||||
// 重置数据
|
||||
dataList.value = []
|
||||
page.value = 1
|
||||
isRefreshed.value = false
|
||||
currentKey.value++
|
||||
},
|
||||
{ deep: true },
|
||||
)
|
||||
|
||||
// 是否加载中
|
||||
const loading = ref(false)
|
||||
@@ -127,7 +131,7 @@ function getParams() {
|
||||
count: 30,
|
||||
name: keyword.value,
|
||||
}
|
||||
|
||||
|
||||
// 添加筛选参数
|
||||
if (filterParams.genre_id) {
|
||||
params.genre_id = parseInt(filterParams.genre_id)
|
||||
@@ -141,7 +145,7 @@ function getParams() {
|
||||
if (filterParams.sort_type) {
|
||||
params.sort_type = filterParams.sort_type
|
||||
}
|
||||
|
||||
|
||||
return params
|
||||
}
|
||||
|
||||
@@ -223,33 +227,18 @@ function removeData(id: number) {
|
||||
<VLabel>{{ t('tmdb.sort') }}</VLabel>
|
||||
</div>
|
||||
<VChipGroup v-model="filterParams.sort_type">
|
||||
<VChip
|
||||
:color="filterParams.sort_type == 'time' ? 'primary' : ''"
|
||||
filter
|
||||
tile
|
||||
value="time"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<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"
|
||||
>
|
||||
<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>
|
||||
@@ -267,7 +256,7 @@ function removeData(id: number) {
|
||||
</VChip>
|
||||
</VChipGroup>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex justify-start align-center mb-3">
|
||||
<div class="mr-5">
|
||||
<VLabel>{{ t('tmdb.rating') }}</VLabel>
|
||||
@@ -280,18 +269,21 @@ function removeData(id: number) {
|
||||
:step="1"
|
||||
class="align-center"
|
||||
hide-details
|
||||
style="width: 200px;"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<span class="ml-2 text-body-2">- 10</span>
|
||||
</template>
|
||||
</VSlider>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<VPageContentTitle v-if="keyword" :title="`${t('common.search')}:${keyword}`" />
|
||||
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
|
||||
<VInfiniteScroll mode="intersect" side="end" :items="dataList" class="overflow-visible px-2" @load="fetchData" :key="currentKey">
|
||||
<VInfiniteScroll
|
||||
mode="intersect"
|
||||
side="end"
|
||||
:items="dataList"
|
||||
class="overflow-visible px-2"
|
||||
@load="fetchData"
|
||||
:key="currentKey"
|
||||
>
|
||||
<template #loading />
|
||||
<template #empty />
|
||||
<div v-if="dataList.length > 0" class="grid gap-4 grid-subscribe-card" tabindex="0">
|
||||
|
||||
Reference in New Issue
Block a user