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