Merge branch 'jxxghp:v2' into v2

This commit is contained in:
madrays
2025-04-08 01:05:39 +08:00
committed by GitHub
19 changed files with 1110 additions and 903 deletions

View File

@@ -77,7 +77,9 @@ export interface Subscribe {
// 过滤规则组
filter_groups?: string[]
// 下载器
downloader: string
downloader?: string
// 自定义剧集组
episode_group?: string
}
// 订阅分享
@@ -138,6 +140,8 @@ export interface SubscribeShare {
media_category?: string
// 复用次数
count?: number
// 自定义剧集组
episode_group?: string
}
// 历史记录
@@ -286,6 +290,8 @@ export interface MediaInfo {
next_episode_to_air?: object
// 别名
names?: string[]
// 剧集组
episode_group?: string
}
// 季信息
@@ -1214,6 +1220,8 @@ export interface TransferForm {
library_type_folder?: boolean
// 媒体库类别子目录
library_category_folder?: boolean
// 剧集组编号
episode_group?: string
}
// 整理队列

View File

@@ -134,6 +134,9 @@ const refreshPending = ref(false)
// 排序
const sort = ref('name')
// 是否显示目录树
const showDirTree = ref(false)
// 计算属性
const storagesArray = computed(() => {
const storageCodes = props.storages?.map(item => item.type)
@@ -163,6 +166,11 @@ function sortChanged(s: string) {
refreshPending.value = true
}
// 切换目录树
function switchDirTree(state: boolean) {
showDirTree.value = state
}
// 文件列表
const fileListItems = ref<FileItem[]>([])
@@ -203,6 +211,7 @@ const fileListStyle = computed(() => {
/>
<div class="flex" :style="scrollStyle">
<FileNavigator
v-if="showDirTree"
:storage="activeStorage"
:currentPath="item.path"
:items="fileListItems"
@@ -220,12 +229,14 @@ const fileListStyle = computed(() => {
:refreshpending="refreshPending"
:sort="sort"
:listStyle="fileListStyle"
:showTree="showDirTree"
@pathchanged="pathChanged"
@loading="loadingChanged"
@refreshed="refreshPending = false"
@filedeleted="refreshPending = true"
@renamed="refreshPending = true"
@items-updated="fileListUpdated"
@switch-tree="switchDirTree"
/>
</div>
</div>

View File

@@ -1,17 +1,18 @@
<script lang="ts" setup>
import type { PropType, Ref } from 'vue'
import { useToast } from 'vue-toast-notification'
import SubscribeEditDialog from '../dialog/SubscribeEditDialog.vue'
import { formatSeason, formatRating } from '@/@core/utils/formatters'
import api from '@/api'
import { doneNProgress, startNProgress } from '@/api/nprogress'
import type { MediaInfo, NotExistMediaInfo, Subscribe, MediaSeason, Site } from '@/api/types'
import router, { registerAbortController } from '@/router'
import noImage from '@images/no-image.jpeg'
import tmdbImage from '@images/logos/tmdb.png'
import doubanImage from '@images/logos/douban-black.png'
import bangumiImage from '@images/logos/bangumi.png'
import api from '@/api'
import { useToast } from 'vue-toast-notification'
import { formatSeason, formatRating } from '@/@core/utils/formatters'
import { doneNProgress, startNProgress } from '@/api/nprogress'
import type { MediaInfo, Subscribe, MediaSeason, Site } from '@/api/types'
import router, { registerAbortController } from '@/router'
import { useUserStore } from '@/stores'
import SubscribeEditDialog from '../dialog/SubscribeEditDialog.vue'
import SearchSiteDialog from '@/components/dialog/SearchSiteDialog.vue'
import SubscribeSeasonDialog from '../dialog/SubscribeSeasonDialog.vue'
// 输入参数
const props = defineProps({
@@ -35,18 +36,12 @@ const isImageLoaded = ref(false)
// 图片加载失败
const imageLoadError = ref(false)
// TMDB识别标志
const tmdbFlag = ref(true)
// 当前订阅状态
const isSubscribed = ref(false)
// 本地存在状态
const isExists = ref(false)
// 各季缺失状态0-已入库 1-部分缺失 2-全部缺失,没有数据也是已入库
const seasonsNotExisted = ref<{ [key: number]: number }>({})
// 订阅季弹窗
const subscribeSeasonDialog = ref(false)
@@ -56,9 +51,6 @@ const subscribeEditDialog = ref(false)
// 订阅ID
const subscribeId = ref<number>()
// 季详情
const seasonInfos = ref<MediaSeason[]>([])
// 选中的订阅季
const seasonsSelected = ref<MediaSeason[]>([])
@@ -84,17 +76,11 @@ const selectedSites = ref<number[]>([])
// 搜索菜单显示状态
const searchMenuShow = ref(false)
// 全选/全不选按钮文字
const checkAllText = computed(() => (selectedSites.value.length === allSites.value.length ? '全不选' : '全选'))
// 选择站点对话框
const chooseSiteDialog = ref(false)
// 全选/全不
function checkAllSitesorNot() {
if (selectedSites.value.length === allSites.value.length) {
selectedSites.value = []
} else {
selectedSites.value = allSites.value.map(item => item.id)
}
}
// 选择的剧集组
const episodeGroup = ref('')
// 查询所有站点
async function querySites() {
@@ -112,7 +98,6 @@ async function querySites() {
async function querySelectedSites() {
try {
const result: { [key: string]: any } = await api.get('system/setting/IndexerSites')
selectedSites.value = result.data?.value ?? []
} catch (error) {
console.log(error)
@@ -127,14 +112,6 @@ function getMediaId() {
else return `${props.media?.mediaid_prefix}:${props.media?.media_id}`
}
// 订阅弹窗选择的多季
function subscribeSeasons() {
subscribeSeasonDialog.value = false
seasonsSelected.value.forEach(season => {
addSubscribe(season.season_number)
})
}
// 角标颜色
function getChipColor(type: string) {
if (type === '电影') return 'border-blue-500 bg-blue-600'
@@ -145,24 +122,9 @@ function getChipColor(type: string) {
// 添加订阅处理
async function handleAddSubscribe() {
if (props.media?.type === '电视剧') {
// 查询所有季信息
await getMediaSeasons()
if (!seasonInfos.value || seasonInfos.value.length === 0) {
$toast.error(`${props.media?.title} 查询剧集信息失败!`)
return
}
// 检查各季的缺失状态
await checkSeasonsNotExists()
if (!tmdbFlag.value) return
if (seasonInfos.value.length === 1) {
// 添加订阅
addSubscribe(1)
} else {
// 弹出季选择列表,支持多选
seasonsSelected.value = []
subscribeSeasonDialog.value = true
}
// 弹出季选择列表,支持多选
seasonsSelected.value = []
subscribeSeasonDialog.value = true
} else {
// 电影
addSubscribe()
@@ -170,15 +132,12 @@ async function handleAddSubscribe() {
}
// 调用API添加订阅电视剧的话需要指定季
async function addSubscribe(season = 0) {
async function addSubscribe(season: number = 0, best_version: number = 0) {
// 开始处理
startNProgress()
try {
// 是否洗版
let best_version = isExists.value ? 1 : 0
if (season && props.media?.tmdb_id)
// 全部存在时洗版
best_version = !seasonsNotExisted.value[season] ? 1 : 0
if (!best_version && props.media?.type == '电影') best_version = isExists.value ? 1 : 0
// 请求API
const result: { [key: string]: any } = await api.post('subscribe/', {
name: props.media?.title,
@@ -190,6 +149,7 @@ async function addSubscribe(season = 0) {
mediaid: props.media?.media_id ? `${props.media?.mediaid_prefix}:${props.media?.media_id}` : '',
season,
best_version,
episode_group: episodeGroup.value,
})
// 订阅状态
@@ -309,48 +269,6 @@ async function checkSubscribe(season = 0) {
return null
}
// 检查所有季的缺失状态(数据库)
async function checkSeasonsNotExists() {
// 开始处理
startNProgress()
try {
const result: NotExistMediaInfo[] = await api.post('mediaserver/notexists', props.media)
if (result) {
result.forEach(item => {
// 0-已入库 1-部分缺失 2-全部缺失
let state = 0
if (item.episodes.length === 0) state = 2
else if (item.episodes.length < item.total_episode) state = 1
seasonsNotExisted.value[item.season] = state
})
}
} catch (error) {
$toast.error(`${props.media?.title}无法识别TMDB媒体信息`)
tmdbFlag.value = false
} finally {
// 处理完成
doneNProgress()
}
}
// 查询TMDB的所有季信息
async function getMediaSeasons() {
startNProgress()
try {
seasonInfos.value = await api.get('media/seasons', {
params: {
mediaid: getMediaId(),
title: props.media?.title,
year: props.media?.year,
season: props.media?.season,
},
})
} catch (error) {
console.error(error)
}
doneNProgress()
}
// 查询订阅弹窗规则
async function queryDefaultSubscribeConfig() {
// 非管理员不显示
@@ -359,9 +277,7 @@ async function queryDefaultSubscribeConfig() {
let subscribe_config_url = ''
if (props.media?.type === '电影') subscribe_config_url = 'system/setting/DefaultMovieSubscribeConfig'
else subscribe_config_url = 'system/setting/DefaultTvSubscribeConfig'
const result: { [key: string]: any } = await api.get(subscribe_config_url)
if (result.data?.value) return result.data.value.show_edit_dialog
} catch (error) {
console.log(error)
@@ -375,24 +291,18 @@ function handleSubscribe() {
else handleAddSubscribe()
}
// 计算存在状态的颜色
function getExistColor(season: number) {
const state = seasonsNotExisted.value[season]
if (!state) return 'success'
if (state === 1) return 'warning'
else if (state === 2) return 'error'
else return 'success'
}
// 计算存在状态的文本
function getExistText(season: number) {
const state = seasonsNotExisted.value[season]
if (!state) return '已入库'
if (state === 1) return '部分缺失'
else if (state === 2) return '缺失'
else return '已入库'
// 订阅多季
function subscribeSeasons(seasons: MediaSeason[], seasonNoExists: { [key: number]: number }, groudId: string) {
subscribeSeasonDialog.value = false
episodeGroup.value = groudId
seasonsSelected.value = seasons || []
seasonsSelected.value.forEach(season => {
let best_version = 0
if (season && props.media?.tmdb_id)
// 全部存在时洗版
best_version = !seasonNoExists[season.season_number || 0] ? 1 : 0
addSubscribe(season.season_number, best_version)
})
}
// 打开详情页
@@ -423,9 +333,11 @@ function goMediaDetail(isHovering = false) {
// 点击搜索
async function clickSearch() {
if (allSites.value?.length > 0) return
querySites()
querySelectedSites()
if (allSites.value?.length == 0) {
querySites()
querySelectedSites()
}
chooseSiteDialog.value = true
}
// 开始搜索
@@ -444,6 +356,13 @@ function handleSearch() {
})
}
// 搜索多站点
function searchSites(sites: number[]) {
chooseSiteDialog.value = false
selectedSites.value = sites
handleSearch()
}
// 懒加载检查
function handleCheckLazy() {
if (props.media?.collection_id) {
@@ -496,26 +415,6 @@ const getImgUrl: Ref<string> = computed(() => {
return url
})
// 拼装季图片地址
function getSeasonPoster(posterPath: string) {
if (!posterPath) return ''
return `https://${globalSettings.TMDB_IMAGE_DOMAIN}/t/p/w500${posterPath}`
}
// 将yyyy-mm-dd转换为yyyy年mm月dd日
function formatAirDate(airDate: string) {
if (!airDate) return ''
const date = new Date(airDate.replaceAll(/-/g, '/'))
return `${date.getFullYear()}${date.getMonth() + 1}${date.getDate()}`
}
// 从yyyy-mm-dd中提取年份
function getYear(airDate: string) {
if (!airDate) return ''
const date = new Date(airDate.replaceAll(/-/g, '/'))
return date.getFullYear()
}
// 移除订阅
function onRemoveSubscribe() {
subscribeEditDialog.value = false
@@ -566,36 +465,7 @@ function onRemoveSubscribe() {
</p>
<div v-if="props.media?.collection_id" class="mb-3" @click.stop=""></div>
<div v-else class="flex align-center justify-between">
<VMenu close-on-content-click v-model="searchMenuShow" max-width="450">
<template v-slot:activator="{ props }">
<IconBtn v-bind="props" icon="mdi-magnify" color="white" @click.stop="clickSearch" />
</template>
<VList>
<VListItem>
<VChipGroup v-model="selectedSites" column multiple @click.stop>
<VChip
v-for="site in allSites"
:key="site.id"
:color="selectedSites.includes(site.id) ? 'primary' : ''"
filter
variant="outlined"
:value="site.id"
size="small"
>
{{ site.name }}
</VChip>
</VChipGroup>
<div>
<VBtn size="small" variant="text" @click.stop="checkAllSitesorNot">
{{ checkAllText }}
</VBtn>
</div>
</VListItem>
<VListItem>
<VBtn @click="handleSearch" block>搜索</VBtn>
</VListItem>
</VList>
</VMenu>
<IconBtn icon="mdi-magnify" color="white" @click.stop="clickSearch" />
<IconBtn icon="mdi-heart" :color="isSubscribed ? 'error' : 'white'" @click.stop="handleSubscribe" />
</div>
</VCardText>
@@ -636,62 +506,13 @@ function onRemoveSubscribe() {
</template>
</VHover>
<!-- 订阅季弹窗 -->
<VBottomSheet v-if="subscribeSeasonDialog" v-model="subscribeSeasonDialog" inset scrollable>
<VCard class="rounded-t">
<DialogCloseBtn @click="subscribeSeasonDialog = false" />
<VCardItem>
<VCardTitle class="pe-10"> 订阅 - {{ props.media?.title }} </VCardTitle>
</VCardItem>
<VDivider />
<VCardText>
<VList v-model:selected="seasonsSelected" lines="three" select-strategy="classic">
<VListItem v-for="(item, i) in seasonInfos" :key="i" :value="item">
<template #prepend>
<VImg
height="90"
width="60"
:src="getSeasonPoster(item.poster_path || '')"
aspect-ratio="2/3"
class="object-cover rounded shadow ring-gray-500 me-3"
cover
>
<template #placeholder>
<div class="w-full h-full">
<VSkeletonLoader class="object-cover aspect-w-2 aspect-h-3" />
</div>
</template>
</VImg>
</template>
<VListItemTitle> {{ item.season_number }} </VListItemTitle>
<VListItemSubtitle class="mt-1 me-2">
<VChip v-if="item.vote_average" color="primary" size="small" class="mb-1">
<VIcon icon="mdi-star" /> {{ item.vote_average }}
</VChip>
{{ getYear(item.air_date || '') }} {{ item.episode_count }}
</VListItemSubtitle>
<VListItemSubtitle>
{{ media?.title }} {{ item.season_number }} 季于 {{ formatAirDate(item.air_date || '') }} 首播
</VListItemSubtitle>
<VListItemSubtitle>
<VChip v-if="seasonsNotExisted" class="mt-2" size="small" :color="getExistColor(item.season_number || 0)">
{{ getExistText(item.season_number || 0) }}
</VChip>
</VListItemSubtitle>
<template #append="{ isSelected }">
<VListItemAction start>
<VSwitch :model-value="isSelected" />
</VListItemAction>
</template>
</VListItem>
</VList>
</VCardText>
<div class="my-2 text-center">
<VBtn size="large" :disabled="seasonsSelected.length === 0" width="30%" @click="subscribeSeasons">
{{ seasonsSelected.length === 0 ? '请选择订阅季' : '提交订阅' }}
</VBtn>
</div>
</VCard>
</VBottomSheet>
<subscribeSeasonDialog
v-if="subscribeSeasonDialog"
v-model="subscribeSeasonDialog"
:media="media"
@subscribe="subscribeSeasons"
@close="subscribeSeasonDialog = false"
/>
<!-- 订阅编辑弹窗 -->
<SubscribeEditDialog
v-if="subscribeEditDialog"
@@ -701,4 +522,13 @@ function onRemoveSubscribe() {
@save="subscribeEditDialog = false"
@remove="onRemoveSubscribe"
/>
<!-- 站点选择对话框 -->
<SearchSiteDialog
v-if="chooseSiteDialog"
v-model="chooseSiteDialog"
:sites="allSites"
:selected="selectedSites"
@search="searchSites"
@close="chooseSiteDialog = false"
/>
</template>

View File

@@ -9,6 +9,7 @@ import api from '@/api'
import type { Site, SiteStatistic, SiteUserData } from '@/api/types'
import { isNullOrEmptyObject } from '@/@core/utils'
import { formatFileSize } from '@/@core/utils/formatters'
import { useConfirm } from 'vuetify-use-dialog'
// 输入参数
const cardProps = defineProps({
@@ -19,6 +20,9 @@ const cardProps = defineProps({
// 定义触发的自定义事件
const emit = defineEmits(['update', 'remove'])
// 确认框
const createConfirm = useConfirm()
// 图标
const siteIcon = ref<string>('')
@@ -103,6 +107,25 @@ function openSitePage() {
window.open(cardProps.site?.url, '_blank')
}
// 调用API删除站点信息
async function deleteSiteInfo() {
const isConfirmed = await createConfirm({
title: '确认',
content: `是否确认删除站点?`,
})
if (!isConfirmed) return
try {
const result: { [key: string]: any } = await api.delete(`site/${cardProps.site?.id}`)
if (result.success) emit('remove')
else $toast.error(`${cardProps.site?.name} 删除失败:${result.message}`)
} catch (error) {
$toast.error(`${cardProps.site?.name} 删除失败!`)
console.error(error)
}
}
// 根据站点状态显示不同的状态图标
const statColor = computed(() => {
if (isNullOrEmptyObject(siteStats.value)) {
@@ -288,8 +311,9 @@ onMounted(() => {
<div class="site-card-actions">
<VTooltip>
<template #activator="{ props }">
<button
<IconBtn
v-bind="props"
elevation="0"
class="site-action-btn test-btn"
@click.stop="testSite"
:class="{ 'testing': testButtonDisable }"
@@ -304,42 +328,39 @@ onMounted(() => {
</div>
<span class="loading-text">测试中</span>
</div>
</button>
</IconBtn>
</template>
<span>测试站点连通性</span>
</VTooltip>
<VTooltip>
<VTooltip v-if="!cardProps.site?.public">
<template #activator="{ props }">
<button v-bind="props" class="site-action-btn" @click.stop="handleSiteUserData">
<IconBtn v-bind="props" elevation="0" class="site-action-btn" @click.stop="handleSiteUserData">
<VIcon icon="mdi-chart-bell-curve" size="18" />
</button>
</IconBtn>
</template>
<span>查看站点数据</span>
</VTooltip>
<VTooltip v-if="!cardProps.site?.public">
<template #activator="{ props }">
<button v-bind="props" class="site-action-btn" @click.stop="handleSiteUpdate">
<IconBtn v-bind="props" elevation="0" class="site-action-btn" @click.stop="handleSiteUpdate">
<VIcon icon="mdi-refresh" size="18" />
</button>
</IconBtn>
</template>
<span>更新Cookie/UA</span>
</VTooltip>
<VTooltip>
<template #activator="{ props }">
<button v-bind="props" class="site-action-btn more-btn">
<IconBtn v-bind="props" elevation="0" class="site-action-btn more-btn">
<VIcon icon="mdi-dots-vertical" size="18" />
<VMenu activator="parent" close-on-content-click location="left">
<VList density="compact" nav class="dropdown-menu">
<VListItem variant="plain" @click.stop="siteEditDialog = true" base-color="info">
<VListItem variant="plain" @click="siteEditDialog = true" base-color="info">
<template #prepend>
<VIcon icon="mdi-file-edit-outline" size="small" />
</template>
<VListItemTitle>编辑站点</VListItemTitle>
</VListItem>
<VListItem variant="plain" @click.stop="emit('remove')">
<VListItem variant="plain" @click="deleteSiteInfo">
<template #prepend>
<VIcon icon="mdi-delete-outline" size="small" color="error" />
</template>
@@ -347,7 +368,7 @@ onMounted(() => {
</VListItem>
</VList>
</VMenu>
</button>
</IconBtn>
</template>
<span>更多操作</span>
</VTooltip>
@@ -387,19 +408,19 @@ onMounted(() => {
<style scoped>
.site-card {
background: rgba(var(--v-theme-surface), 0.95);
border-radius: 10px;
border: 1px solid rgba(var(--v-theme-on-surface), 0.09);
transition: all 0.3s ease;
cursor: pointer;
position: relative;
overflow: hidden;
border: 1px solid rgba(var(--v-theme-on-surface), 0.09);
border-radius: 10px;
background: rgba(var(--v-theme-surface), 0.95);
cursor: pointer;
transition: all 0.3s ease;
}
.site-card:hover {
transform: translateY(-4px);
border-color: rgba(var(--v-theme-primary), 0.2);
box-shadow: 0 3px 12px -6px rgba(0, 0, 0, 0.1);
box-shadow: 0 3px 12px -6px rgba(0, 0, 0, 10%);
transform: translateY(-4px);
}
.inactive {
@@ -408,19 +429,19 @@ onMounted(() => {
.site-card-content {
z-index: 1;
padding: 10px 12px 10px;
padding-block: 10px;
padding-inline: 12px;
}
/* 站点状态指示器 - 更精致的渐变指示 */
.site-status-indicator {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
opacity: 0.5;
z-index: 1;
transition: height 0.3s ease, opacity 0.3s ease;
block-size: 2px;
inset-block-start: 0;
inset-inline: 0;
opacity: 0.5;
transition: block-size 0.3s ease, opacity 0.3s ease;
}
.site-status-indicator.error {
@@ -445,7 +466,7 @@ onMounted(() => {
/* 站点卡片悬停时状态指示器变化 */
.site-card:hover .site-status-indicator {
height: 2px;
block-size: 2px;
opacity: 0.8;
}
@@ -457,9 +478,9 @@ onMounted(() => {
/* 数据显示相关样式 */
.data-transfer-stats {
margin-top: 6px;
padding-top: 6px;
border-top: 1px solid rgba(var(--v-theme-on-surface), 0.05);
border-block-start: 1px solid rgba(var(--v-theme-on-surface), 0.05);
margin-block-start: 6px;
padding-block-start: 6px;
}
.data-row {
@@ -467,62 +488,59 @@ onMounted(() => {
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 6px;
margin-block-end: 6px;
}
.data-row:last-child {
margin-bottom: 0;
margin-block-end: 0;
}
.data-label {
display: flex;
align-items: center;
font-size: 0.8rem;
color: rgba(var(--v-theme-on-surface), 0.8);
min-width: 70px;
font-size: 0.8rem;
min-inline-size: 70px;
}
.data-progress-bar {
position: relative;
height: 4px;
overflow: hidden;
flex-grow: 1;
border-radius: 4px;
background: rgba(var(--v-theme-on-surface), 0.08);
flex-grow: 1;
block-size: 4px;
}
.progress-filled {
position: absolute;
left: 0;
top: 0;
height: 100%;
min-width: 3px;
border-radius: 4px;
transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
overflow: hidden;
border-radius: 4px;
block-size: 100%;
inset-block-start: 0;
inset-inline-start: 0;
min-inline-size: 3px;
transition: inline-size 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.upload-filled {
background: linear-gradient(90deg, #4d79ff, #0077ff);
box-shadow: 0 0 4px rgba(0, 119, 255, 0.5);
animation: pulse-width 2s infinite;
background: linear-gradient(90deg, #4d79ff, #07f);
box-shadow: 0 0 4px rgba(0, 119, 255, 50%);
}
.download-filled {
background: linear-gradient(90deg, #42d392, #00b77e);
box-shadow: 0 0 4px rgba(0, 183, 126, 0.5);
animation: pulse-width 2s infinite;
background: linear-gradient(90deg, #42d392, #00b77e);
box-shadow: 0 0 4px rgba(0, 183, 126, 50%);
}
.progress-glow {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
background-size: 200% 100%;
animation: shimmer 1.5s linear infinite;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 50%), transparent);
background-size: 200% 100%;
inset: 0;
}
@keyframes pulse-width {
@@ -530,6 +548,7 @@ onMounted(() => {
100% {
opacity: 0.85;
}
50% {
opacity: 1;
}
@@ -539,6 +558,7 @@ onMounted(() => {
0% {
background-position: -100% 0;
}
100% {
background-position: 100% 0;
}
@@ -546,24 +566,24 @@ onMounted(() => {
/* 速度等级样式 */
.speed-idle {
width: 5% !important;
opacity: 0.5;
animation: none !important;
inline-size: 5% !important;
opacity: 0.5;
}
.speed-low {
width: 30% !important;
animation-duration: 6s !important;
inline-size: 30% !important;
}
.speed-medium {
width: 50% !important;
animation-duration: 4s !important;
inline-size: 50% !important;
}
.speed-high {
width: 70% !important;
animation-duration: 2s !important;
inline-size: 70% !important;
}
@keyframes pulse-width {
@@ -571,6 +591,7 @@ onMounted(() => {
100% {
transform: scaleX(0.95);
}
50% {
transform: scaleX(1.05);
}
@@ -580,6 +601,7 @@ onMounted(() => {
0% {
background-position: -200% 0;
}
100% {
background-position: 200% 0;
}
@@ -587,14 +609,14 @@ onMounted(() => {
/* 站点图标 */
.site-icon-container {
width: 38px;
height: 38px;
border-radius: 8px;
overflow: hidden;
position: relative;
transition: transform 0.2s ease;
overflow: hidden;
border-radius: 8px;
block-size: 38px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 6%);
cursor: pointer;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
inline-size: 38px;
transition: transform 0.2s ease;
}
.site-icon-container:hover {
@@ -602,18 +624,18 @@ onMounted(() => {
}
.site-icon {
width: 100%;
height: 100%;
block-size: 100%;
inline-size: 100%;
object-fit: cover;
}
.site-icon-edit-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(0, 0, 0, 0.5);
background-color: rgba(0, 0, 0, 50%);
inset: 0;
opacity: 0;
transition: opacity 0.2s ease;
}
@@ -631,10 +653,10 @@ onMounted(() => {
/* 站点网址 */
.site-url {
font-size: 0.9rem;
color: rgba(var(--v-theme-on-surface), 0.6);
transition: color 0.2s ease;
cursor: pointer;
font-size: 0.9rem;
transition: color 0.2s ease;
}
.site-url:hover {
@@ -643,46 +665,46 @@ onMounted(() => {
/* 站点特性图标 */
.site-feature-icon {
opacity: 0.85;
color: rgba(var(--v-theme-primary), 0.95);
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 5%));
margin-block: 0;
margin-inline: 1px;
opacity: 0.85;
transition: all 0.2s ease;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
margin: 0 1px;
}
.site-feature-icon:hover {
filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 10%));
opacity: 1;
transform: translateY(-1px);
filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}
/* 特性标签 */
.site-features {
margin-top: 0;
margin-block-start: 0;
}
/* 数据统计 */
.site-stats {
margin-top: auto;
border-top: 1px solid rgba(var(--v-theme-on-surface), 0.05);
padding-top: 6px;
margin-block-start: auto;
padding-block-start: 1rem;
}
.site-data-values {
font-size: 12px;
color: rgba(var(--v-theme-on-surface), 0.8);
font-size: 12px;
}
.site-data-bar {
height: 3px;
border-radius: 1.5px;
overflow: hidden;
border-radius: 1.5px;
block-size: 3px;
}
.site-data-bar-bg {
position: absolute;
inset: 0;
background-color: rgba(var(--v-theme-on-surface), 0.05);
inset: 0;
}
.site-data-bar-upload {
@@ -709,103 +731,101 @@ onMounted(() => {
/* 操作按钮 */
.site-card-actions {
position: absolute;
right: 0;
top: 0;
bottom: 0;
z-index: 20;
display: flex;
flex-direction: column;
padding: 8px 4px;
background: rgba(var(--v-theme-surface), 0.97);
border-inline-start: 1px solid rgba(var(--v-theme-on-surface), 0.06);
inset-block: 0;
inset-inline-end: 0;
padding-block: 8px;
padding-inline: 4px;
transform: translateX(100%);
transition: transform 0.2s ease;
z-index: 20;
border-left: 1px solid rgba(var(--v-theme-on-surface), 0.06);
}
/* 测试按钮特殊样式 */
.test-btn {
width: 40px !important;
min-width: 40px;
height: 40px !important;
padding: 0;
position: relative;
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 0;
border-radius: 50% !important;
margin-bottom: 12px;
block-size: 40px !important;
inline-size: 40px !important;
margin-block-end: 12px;
min-inline-size: 40px;
}
.test-btn-content {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
block-size: 100%;
inline-size: 100%;
}
.loading-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 10;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: rgba(var(--v-theme-surface), 0.95);
border-radius: 50%;
z-index: 10;
animation: fade-in 0.2s ease;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
background: rgba(var(--v-theme-surface), 0.95);
box-shadow: 0 2px 10px rgba(0, 0, 0, 10%);
inset: 0;
}
.loading-spinner {
position: relative;
width: 24px;
height: 24px;
block-size: 24px;
inline-size: 24px;
}
.spinner-circle {
position: absolute;
width: 100%;
height: 100%;
border: 2px solid rgba(var(--v-theme-primary), 0.2);
border-top-color: rgba(var(--v-theme-primary), 1);
border-radius: 50%;
animation: spin 0.8s linear infinite;
block-size: 100%;
border-block-start-color: rgba(var(--v-theme-primary), 1);
inline-size: 100%;
}
.spinner-circle-dot {
position: absolute;
top: 0;
left: 50%;
width: 4px;
height: 4px;
margin-left: -2px;
margin-top: -2px;
background-color: rgba(var(--v-theme-primary), 1);
border-radius: 50%;
animation: spin 0.8s linear infinite reverse;
background-color: rgba(var(--v-theme-primary), 1);
block-size: 4px;
inline-size: 4px;
inset-block-start: 0;
inset-inline-start: 50%;
margin-block-start: -2px;
margin-inline-start: -2px;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.loading-text {
position: absolute;
color: rgba(var(--v-theme-primary), 1);
font-size: 12px;
font-weight: 500;
margin-top: 4px;
color: rgba(var(--v-theme-primary), 1);
position: absolute;
bottom: -20px;
inset-block-end: -20px;
margin-block-start: 4px;
white-space: nowrap;
}
@@ -813,40 +833,41 @@ onMounted(() => {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.pulse-dot {
width: 22px;
height: 22px;
border-radius: 50%;
position: relative;
border-radius: 50%;
background-color: transparent;
block-size: 22px;
box-shadow: inset 0 0 0 2px rgba(var(--v-theme-on-surface), 0.1);
inline-size: 22px;
}
.pulse-dot::before {
content: '';
position: absolute;
width: 70%;
height: 70%;
top: 15%;
left: 15%;
border-radius: 50%;
z-index: 1;
border-radius: 50%;
block-size: 70%;
content: '';
inline-size: 70%;
inset-block-start: 15%;
inset-inline-start: 15%;
}
.pulse-dot::after {
content: '';
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
border-radius: 50%;
z-index: 2;
border-radius: 50%;
block-size: 100%;
content: '';
inline-size: 100%;
inset-block-start: 0;
inset-inline-start: 0;
}
.pulse-dot.error::before {
@@ -855,8 +876,8 @@ onMounted(() => {
}
.pulse-dot.error::after {
box-shadow: 0 0 0 2px rgba(var(--v-theme-error), 0.3);
animation: pulse-animation-error 2s infinite;
box-shadow: 0 0 0 2px rgba(var(--v-theme-error), 0.3);
}
.pulse-dot.warning::before {
@@ -865,8 +886,8 @@ onMounted(() => {
}
.pulse-dot.warning::after {
box-shadow: 0 0 0 2px rgba(var(--v-theme-warning), 0.3);
animation: pulse-animation-warning 2s infinite;
box-shadow: 0 0 0 2px rgba(var(--v-theme-warning), 0.3);
}
.pulse-dot.success::before {
@@ -875,8 +896,8 @@ onMounted(() => {
}
.pulse-dot.success::after {
box-shadow: 0 0 0 2px rgba(var(--v-theme-success), 0.3);
animation: pulse-animation-success 2s infinite;
box-shadow: 0 0 0 2px rgba(var(--v-theme-success), 0.3);
}
.pulse-dot.secondary::before {
@@ -885,17 +906,19 @@ onMounted(() => {
}
.pulse-dot.secondary::after {
box-shadow: 0 0 0 2px rgba(var(--v-theme-secondary), 0.3);
animation: pulse-animation-secondary 2s infinite;
box-shadow: 0 0 0 2px rgba(var(--v-theme-secondary), 0.3);
}
@keyframes pulse-animation-error {
0% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-error), 0.6);
}
70% {
box-shadow: 0 0 0 10px rgba(var(--v-theme-error), 0);
}
100% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-error), 0);
}
@@ -905,9 +928,11 @@ onMounted(() => {
0% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-warning), 0.6);
}
70% {
box-shadow: 0 0 0 10px rgba(var(--v-theme-warning), 0);
}
100% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-warning), 0);
}
@@ -917,9 +942,11 @@ onMounted(() => {
0% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-success), 0.6);
}
70% {
box-shadow: 0 0 0 10px rgba(var(--v-theme-success), 0);
}
100% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-success), 0);
}
@@ -929,9 +956,11 @@ onMounted(() => {
0% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-secondary), 0.6);
}
70% {
box-shadow: 0 0 0 10px rgba(var(--v-theme-secondary), 0);
}
100% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-secondary), 0);
}
@@ -942,37 +971,37 @@ onMounted(() => {
}
.site-action-btn {
width: 36px;
height: 36px;
position: relative;
display: flex;
overflow: hidden;
align-items: center;
justify-content: center;
border-radius: 8px;
margin-bottom: 8px;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
background-color: rgba(var(--v-theme-surface), 1);
color: rgba(var(--v-theme-on-surface), 0.8);
border: none;
border-radius: 8px;
background-color: rgba(var(--v-theme-surface), 1);
block-size: 32px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 5%);
color: rgba(var(--v-theme-on-surface), 0.8);
cursor: pointer;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
position: relative;
overflow: hidden;
inline-size: 36px;
margin-block-end: 4px;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-action-btn::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(circle at center, rgba(var(--v-theme-primary), 0.1), transparent 70%);
content: '';
inset: 0;
opacity: 0;
transition: opacity 0.3s ease;
}
.site-action-btn:hover {
background-color: white;
box-shadow: 0 3px 6px rgba(0, 0, 0, 10%);
color: rgba(var(--v-theme-primary), 1);
transform: translateY(-2px);
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}
.site-action-btn:hover::before {
@@ -987,31 +1016,32 @@ onMounted(() => {
0% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-primary), 0.4);
}
70% {
box-shadow: 0 0 0 6px rgba(var(--v-theme-primary), 0);
}
100% {
box-shadow: 0 0 0 0 rgba(var(--v-theme-primary), 0);
}
}
.site-action-btn.more-btn {
margin-bottom: 0;
margin-top: auto;
margin-block: auto 0;
}
.dropdown-menu {
border-radius: 8px;
overflow: hidden;
border-radius: 8px;
}
.feature-icon-wrapper {
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border-radius: 4px;
block-size: 24px;
inline-size: 24px;
transition: background-color 0.2s ease;
}

View File

@@ -7,7 +7,7 @@ const props = defineProps({
<template>
<!-- 手动整理进度框 -->
<VDialog :scrim="false" width="25rem">
<VCard color="primary">
<VCard color="primary" rounded="md">
<VCardText class="text-center">
{{ props.text }}
<VProgressLinear color="white" class="mb-0 mt-1" :model-value="props.value" indeterminate />

View File

@@ -87,6 +87,7 @@ const transferForm = reactive<TransferForm>({
// 所有媒体库目录
const directories = ref<TransferDirectoryConf[]>([])
// 查询目录
async function loadDirectories() {
try {
@@ -221,7 +222,7 @@ onUnmounted(() => {
</script>
<template>
<VDialog scrollable max-width="50rem" :fullscreen="!display.mdAndUp.value">
<VDialog scrollable max-width="45rem" :fullscreen="!display.mdAndUp.value">
<VCard :title="dialogTitle" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDivider />
@@ -263,7 +264,7 @@ onUnmounted(() => {
</VCol>
</VRow>
<VRow>
<VCol cols="12" md="4">
<VCol cols="12" md="6">
<VSelect
v-model="transferForm.type_name"
label="类型"
@@ -276,7 +277,7 @@ onUnmounted(() => {
persistent-hint
/>
</VCol>
<VCol cols="12" md="4">
<VCol cols="12" md="6">
<VTextField
v-if="mediaSource === 'themoviedb'"
v-model="transferForm.tmdbid"
@@ -302,19 +303,37 @@ onUnmounted(() => {
@click:append-inner="mediaSelectorDialog = true"
/>
</VCol>
<VCol cols="12" md="4">
<VSelect
v-show="transferForm.type_name === '电视剧'"
v-model.number="transferForm.season"
label="季"
:items="seasonItems"
hint="指定季数"
</VRow>
<VRow v-show="transferForm.type_name === '电视剧'">
<VCol cols="12" md="6">
<VTextField
v-model="transferForm.episode_group"
label="剧集组编号"
placeholder="手动查询剧集组"
hint="指定剧集组"
persistent-hint
/>
</VCol>
</VRow>
<VRow>
<VCol cols="12" md="8">
<VCol cols="12" md="3">
<VSelect
v-model.number="transferForm.season"
label="季"
:items="seasonItems"
hint="第几季"
persistent-hint
/>
</VCol>
<VCol cols="12" md="3">
<VTextField
v-model="transferForm.episode_detail"
:disabled="disableEpisodeDetail"
label="集"
placeholder="起始集,终止集"
hint="集数或范围如1或1,2"
persistent-hint
/>
</VCol>
<VCol cols="12" md="6">
<VTextField
v-model="transferForm.episode_format"
label="集数定位"
@@ -323,26 +342,7 @@ onUnmounted(() => {
persistent-hint
/>
</VCol>
<VCol cols="12" md="4">
<VTextField
v-model="transferForm.episode_detail"
:disabled="disableEpisodeDetail"
label="指定集数"
placeholder="起始集,终止集如1或1,2"
hint="指定集数或范围如1或1,2"
persistent-hint
/>
</VCol>
<VCol cols="12" md="4">
<VTextField
v-model="transferForm.episode_part"
label="指定Part"
placeholder="如part1"
hint="指定Part如part1"
persistent-hint
/>
</VCol>
<VCol cols="12" md="4">
<VCol cols="12" md="6">
<VTextField
v-model="transferForm.episode_offset"
label="集数偏移"
@@ -351,7 +351,18 @@ onUnmounted(() => {
persistent-hint
/>
</VCol>
<VCol cols="12" md="4">
</VRow>
<VRow>
<VCol cols="12" md="6">
<VTextField
v-model="transferForm.episode_part"
label="指定Part"
placeholder="如part1"
hint="指定Part如part1"
persistent-hint
/>
</VCol>
<VCol cols="12" md="6">
<VTextField
v-model.number="transferForm.min_filesize"
label="最小文件大小MB"

View File

@@ -1,19 +1,15 @@
<script setup lang="ts">
import api from '@/api'
import type { Plugin, Site, Subscribe } from '@/api/types'
import type { Site, Plugin, Subscribe } from '@/api/types'
import { SystemNavMenus, SettingTabs } from '@/router/menu'
import { NavMenu } from '@/@layouts/types'
import { useUserStore } from '@/stores'
import { useTheme } from 'vuetify'
import { computed, onMounted, ref } from 'vue'
import SearchSiteDialog from '@/components/dialog/SearchSiteDialog.vue'
//
interface SiteInfo {
id: number
name: string
is_active: boolean
[key: string]: any
}
// propsmodelValue
const props = defineProps<{
modelValue: boolean
}>()
//
const router = useRouter()
@@ -27,10 +23,13 @@ const superUser = userStore.superUser
//
const userName = userStore.userName
// propsmodelValue
const props = defineProps<{
modelValue: boolean
}>()
//
const SubscribeItems = ref<Subscribe[]>([])
//
const chooseSiteDialog = ref(false)
const selectedSites = ref<number[]>([])
const allSites = ref<Site[]>([])
//
const emit = defineEmits(['close', 'update:modelValue'])
@@ -50,20 +49,6 @@ const searchWordInput = ref<HTMLElement | null>(null)
//
const recentSearches = ref<string[]>([])
// /
const checkAllText = computed(() => {
return selectedSites.value.length < allSites.value.length ? '选择全部' : '取消全选'
})
// /
const checkAllSitesorNot = () => {
if (selectedSites.value.length < allSites.value.length) {
selectedSites.value = allSites.value.map((item: SiteInfo) => item.id)
} else {
selectedSites.value = []
}
}
//
function saveRecentSearches(keyword: string) {
if (!keyword) return
@@ -158,15 +143,6 @@ const matchedPluginItems = computed(() => {
})
})
//
const SubscribeItems = ref<Subscribe[]>([])
//
const showSiteDialog = ref(false)
const siteFilter = ref('')
const selectedSites = ref<number[]>([])
const allSites = ref<SiteInfo[]>([])
//
async function fetchSubscribes() {
try {
@@ -176,15 +152,6 @@ async function fetchSubscribes() {
}
}
//
const filteredSites = computed(() => {
if (!siteFilter.value) return allSites.value
const filter = siteFilter.value.toLowerCase()
return allSites.value.filter((site: SiteInfo) =>
site.name.toLowerCase().includes(filter)
)
})
//
const saveUserSitePreferences = () => {
try {
@@ -204,7 +171,7 @@ const loadUserSitePreferences = async () => {
console.log('从本地加载站点选择:', selectedSites.value)
return
}
//
const result = await api.get('system/setting/IndexerSites')
if (result && result.data && result.data.value) {
@@ -219,34 +186,37 @@ const loadUserSitePreferences = async () => {
//
const getSiteCategories = () => {
api.get('site/').then(async (res: any) => {
if (res && Array.isArray(res)) {
allSites.value = res.filter((site: any) => site.is_active) || []
//
await loadUserSitePreferences()
//
if (selectedSites.value.length === 0 && allSites.value.length > 0) {
selectedSites.value = allSites.value.map((site: SiteInfo) => site.id)
api
.get('site/')
.then(async (res: any) => {
if (res && Array.isArray(res)) {
allSites.value = res.filter((site: any) => site.is_active) || []
//
await loadUserSitePreferences()
//
if (selectedSites.value.length === 0 && allSites.value.length > 0) {
selectedSites.value = allSites.value.map((site: Site) => site.id)
}
} else if (res.data && Array.isArray(res.data)) {
allSites.value = res.data.filter((site: any) => site.is_active) || []
//
await loadUserSitePreferences()
//
if (selectedSites.value.length === 0 && allSites.value.length > 0) {
selectedSites.value = allSites.value.map((site: Site) => site.id)
}
}
} else if (res.data && Array.isArray(res.data)) {
allSites.value = res.data.filter((site: any) => site.is_active) || []
//
await loadUserSitePreferences()
//
if (selectedSites.value.length === 0 && allSites.value.length > 0) {
selectedSites.value = allSites.value.map((site: SiteInfo) => site.id)
}
}
console.log('站点数据:', allSites.value)
console.log('已选站点:', selectedSites.value)
}).catch(err => {
console.error('获取站点数据失败:', err)
})
console.log('站点数据:', allSites.value)
console.log('已选站点:', selectedSites.value)
})
.catch(err => {
console.error('获取站点数据失败:', err)
})
}
//
const openSiteDialog = () => {
showSiteDialog.value = true
chooseSiteDialog.value = true
}
//
@@ -258,8 +228,21 @@ const matchedSubscribeItems = computed(() => {
})
})
//
const searchTorrent = () => {
//
function searchSites(sites: number[]) {
chooseSiteDialog.value = false
selectedSites.value = sites
searchTorrent()
}
//
function chooseSitesDone(sites: number[]) {
chooseSiteDialog.value = false
selectedSites.value = sites
}
//
function searchTorrent() {
if (!searchWord.value) return
//
saveRecentSearches(searchWord.value)
@@ -381,9 +364,9 @@ onMounted(() => {
</template>
</DialogCloseBtn>
</VCardItem>
<VDivider class="search-divider" />
<!-- 主搜索结果区域 -->
<VCardText class="search-results-container pa-0">
<!-- 有搜索词时显示结果 -->
@@ -392,7 +375,7 @@ onMounted(() => {
<VListSubheader class="primary-text font-weight-medium text-uppercase py-2 px-4 px-sm-6">
<span class="category-title">媒体搜索</span>
</VListSubheader>
<!-- 媒体搜索选项 -->
<VHover>
<template #default="hover">
@@ -406,16 +389,14 @@ onMounted(() => {
>
<template #prepend>
<div class="option-icon-wrapper d-flex align-center justify-center">
<VIcon
icon="mdi-movie-search"
<VIcon
icon="mdi-movie-search"
:color="hover.isHovering ? 'primary' : 'medium-emphasis'"
size="small"
/>
</div>
</template>
<VListItemTitle class="text-subtitle-1 font-weight-medium">
电影电视剧
</VListItemTitle>
<VListItemTitle class="text-subtitle-1 font-weight-medium"> 电影电视剧 </VListItemTitle>
<VListItemSubtitle class="text-body-2 text-medium-emphasis mt-1">
搜索 <span class="primary-text font-weight-medium">{{ searchWord }}</span> 相关的影视作品
</VListItemSubtitle>
@@ -425,7 +406,7 @@ onMounted(() => {
</VListItem>
</template>
</VHover>
<VHover>
<template #default="hover">
<VListItem
@@ -438,16 +419,14 @@ onMounted(() => {
>
<template #prepend>
<div class="option-icon-wrapper d-flex align-center justify-center">
<VIcon
icon="mdi-movie-filter"
<VIcon
icon="mdi-movie-filter"
:color="hover.isHovering ? 'primary' : 'medium-emphasis'"
size="small"
/>
</div>
</template>
<VListItemTitle class="text-subtitle-1 font-weight-medium">
系列合集
</VListItemTitle>
<VListItemTitle class="text-subtitle-1 font-weight-medium"> 系列合集 </VListItemTitle>
<VListItemSubtitle class="text-body-2 text-medium-emphasis mt-1">
搜索 <span class="primary-text font-weight-medium">{{ searchWord }}</span> 相关的系列作品
</VListItemSubtitle>
@@ -457,29 +436,27 @@ onMounted(() => {
</VListItem>
</template>
</VHover>
<VHover>
<template #default="hover">
<VListItem
<VListItem
density="comfortable"
link
link
rounded="xl"
v-bind="hover.props"
v-bind="hover.props"
@click="searchMedia('person')"
class="search-option mx-2 mx-sm-4 my-1"
>
<template #prepend>
<div class="option-icon-wrapper d-flex align-center justify-center">
<VIcon
icon="mdi-account-search"
<VIcon
icon="mdi-account-search"
:color="hover.isHovering ? 'primary' : 'medium-emphasis'"
size="small"
/>
</div>
</template>
<VListItemTitle class="text-subtitle-1 font-weight-medium">
演职人员
</VListItemTitle>
<VListItemTitle class="text-subtitle-1 font-weight-medium"> 演职人员 </VListItemTitle>
<VListItemSubtitle class="text-body-2 text-medium-emphasis mt-1">
搜索 <span class="primary-text font-weight-medium">{{ searchWord }}</span> 相关的演员导演等
</VListItemSubtitle>
@@ -489,29 +466,23 @@ onMounted(() => {
</VListItem>
</template>
</VHover>
<VHover v-if="superUser">
<template #default="hover">
<VListItem
<VListItem
density="comfortable"
link
link
rounded="xl"
v-bind="hover.props"
v-bind="hover.props"
@click="searchHistory"
class="search-option mx-2 mx-sm-4 my-1"
>
<template #prepend>
<div class="option-icon-wrapper d-flex align-center justify-center">
<VIcon
icon="mdi-history"
:color="hover.isHovering ? 'primary' : 'medium-emphasis'"
size="small"
/>
<VIcon icon="mdi-history" :color="hover.isHovering ? 'primary' : 'medium-emphasis'" size="small" />
</div>
</template>
<VListItemTitle class="text-subtitle-1 font-weight-medium">
整理记录
</VListItemTitle>
<VListItemTitle class="text-subtitle-1 font-weight-medium"> 整理记录 </VListItemTitle>
<VListItemSubtitle class="text-body-2 text-medium-emphasis mt-1">
搜索 <span class="primary-text font-weight-medium">{{ searchWord }}</span> 相关的历史记录
</VListItemSubtitle>
@@ -525,14 +496,11 @@ onMounted(() => {
<!-- 其他搜索结果 -->
<template v-if="matchedSubscribeItems.length > 0">
<VDivider class="mx-4 mx-sm-6 my-2 search-divider" />
<VListSubheader class="primary-text font-weight-medium text-uppercase py-2 px-4 px-sm-6">
<VListSubheader class="primary-text font-weight-medium text-uppercase py-2 px-4 px-sm-6">
<span class="category-title">订阅内容</span>
</VListSubheader>
<VHover
v-for="subscribe in matchedSubscribeItems"
:key="subscribe.id"
>
<VHover v-for="subscribe in matchedSubscribeItems" :key="subscribe.id">
<template #default="hover">
<VListItem
density="comfortable"
@@ -544,17 +512,18 @@ onMounted(() => {
>
<template #prepend>
<div class="option-icon-wrapper d-flex align-center justify-center">
<VIcon
:icon="subscribe.type === '电影' ? 'mdi-movie-roll' : 'mdi-television-classic'"
<VIcon
:icon="subscribe.type === '电影' ? 'mdi-movie-roll' : 'mdi-television-classic'"
:color="hover.isHovering ? 'primary' : 'medium-emphasis'"
size="small"
/>
</div>
</template>
<VListItemTitle class="text-subtitle-1 font-weight-medium">
{{ subscribe.name }}<span v-if="subscribe.season" class="text-body-2"> {{ subscribe.season }} </span>
{{ subscribe.name
}}<span v-if="subscribe.season" class="text-body-2"> {{ subscribe.season }} </span>
</VListItemTitle>
<VListItemSubtitle class="text-body-2 text-medium-emphasis mt-1">
<VListItemSubtitle class="text-body-2 text-medium-emphasis mt-1">
{{ subscribe.type }}
</VListItemSubtitle>
<template #append>
@@ -564,13 +533,13 @@ onMounted(() => {
</template>
</VHover>
</template>
<template v-if="matchedMenuItems.length > 0">
<VDivider class="mx-4 mx-sm-6 my-2 search-divider" />
<VListSubheader class="primary-text font-weight-medium text-uppercase py-2 px-4 px-sm-6">
<VListSubheader class="primary-text font-weight-medium text-uppercase py-2 px-4 px-sm-6">
<span class="category-title">功能菜单</span>
</VListSubheader>
<VHover v-for="menu in matchedMenuItems" :key="menu.title">
<template #default="hover">
<VListItem
@@ -583,8 +552,8 @@ onMounted(() => {
>
<template #prepend>
<div class="option-icon-wrapper d-flex align-center justify-center">
<VIcon
:icon="menu.icon as string"
<VIcon
:icon="menu.icon as string"
:color="hover.isHovering ? 'primary' : 'medium-emphasis'"
size="small"
/>
@@ -593,7 +562,7 @@ onMounted(() => {
<VListItemTitle class="text-subtitle-1 font-weight-medium">
{{ menu.title }}
</VListItemTitle>
<VListItemSubtitle v-if="menu.description" class="text-body-2 text-medium-emphasis mt-1">
<VListItemSubtitle v-if="menu.description" class="text-body-2 text-medium-emphasis mt-1">
{{ menu.description }}
</VListItemSubtitle>
<template #append>
@@ -603,13 +572,13 @@ onMounted(() => {
</template>
</VHover>
</template>
<template v-if="matchedPluginItems.length > 0">
<VDivider class="mx-4 mx-sm-6 my-2 search-divider" />
<VListSubheader class="primary-text font-weight-medium text-uppercase py-2 px-4 px-sm-6">
<VListSubheader class="primary-text font-weight-medium text-uppercase py-2 px-4 px-sm-6">
<span class="category-title">插件</span>
</VListSubheader>
<VHover v-for="plugin in matchedPluginItems" :key="plugin.id">
<template #default="hover">
<VListItem
@@ -622,18 +591,14 @@ onMounted(() => {
>
<template #prepend>
<div class="option-icon-wrapper d-flex align-center justify-center">
<VIcon
icon="mdi-puzzle"
:color="hover.isHovering ? 'primary' : 'medium-emphasis'"
size="small"
/>
<VIcon icon="mdi-puzzle" :color="hover.isHovering ? 'primary' : 'medium-emphasis'" size="small" />
</div>
</template>
<VListItemTitle class="text-subtitle-1 font-weight-medium">
{{ plugin.plugin_name }}
<VListItemTitle class="text-subtitle-1 font-weight-medium">
{{ plugin.plugin_name }}
</VListItemTitle>
<VListItemSubtitle class="text-body-2 text-medium-emphasis mt-1">
{{ plugin.plugin_desc }}
<VListItemSubtitle class="text-body-2 text-medium-emphasis mt-1">
{{ plugin.plugin_desc }}
</VListItemSubtitle>
<template #append>
<VIcon v-if="hover.isHovering" icon="mdi-chevron-right" color="primary" />
@@ -642,15 +607,15 @@ onMounted(() => {
</template>
</VHover>
</template>
<!-- 将站点资源搜索移到最底部 -->
<template v-if="searchWord">
<VDivider class="mx-4 mx-sm-6 my-2 search-divider" />
<VListSubheader class="primary-text font-weight-medium text-uppercase py-2 px-4 px-sm-6">
<VListSubheader class="primary-text font-weight-medium text-uppercase py-2 px-4 px-sm-6">
<span class="category-title">站点资源搜索</span>
</VListSubheader>
<VCard class="mx-3 mx-sm-6 mb-4 mt-2 site-search-card" elevation="0">
<VCard class="mx-3 mx-sm-6 mb-4 mt-2 site-search-card">
<VCardText class="pa-3 pa-sm-4">
<div class="d-flex flex-column">
<div class="d-flex align-center mb-3">
@@ -663,20 +628,19 @@ onMounted(() => {
搜索 <span class="primary-text font-weight-medium">{{ searchWord }}</span> 相关资源
</div>
</div>
<VBtn
color="primary"
@click="searchTorrent"
<VBtn
color="primary"
@click="searchTorrent"
prepend-icon="mdi-magnify"
rounded="pill"
size="small"
variant="flat"
elevation="0"
rounded="pill"
class="search-btn"
>
搜索
</VBtn>
</div>
<div class="d-flex align-center flex-wrap site-chips-container mt-1 py-2 px-2 px-sm-3">
<div class="d-flex align-center flex-wrap flex-grow-1">
<VChip
@@ -706,8 +670,8 @@ onMounted(() => {
+{{ selectedSites.length - 5 }}
</VChip>
</div>
<VBtn
size="small"
<VBtn
size="small"
variant="tonal"
color="primary"
@click="openSiteDialog"
@@ -722,7 +686,7 @@ onMounted(() => {
</VCard>
</template>
</VList>
<!-- 无搜索词时显示最近搜索和提示 -->
<div v-else class="recent-searches py-6 px-4 px-sm-6">
<div v-if="recentSearches.length > 0" class="mb-6">
@@ -742,7 +706,7 @@ onMounted(() => {
</VChip>
</div>
</div>
<div class="text-center mt-6 py-6 empty-search-state">
<div class="search-icon-wrapper mx-auto mb-4">
<VIcon icon="mdi-magnify" size="large" color="primary" />
@@ -756,168 +720,17 @@ onMounted(() => {
</VDialog>
<!-- 站点选择对话框 -->
<VDialog v-model="showSiteDialog" max-width="640px" persistent fullscreen-mobile>
<VCard class="site-dialog">
<VCardTitle class="d-flex align-center pa-4">
<span class="text-h6 font-weight-medium">选择搜索站点</span>
<VSpacer />
<VTextField
v-model="siteFilter"
placeholder="过滤站点..."
density="compact"
variant="outlined"
hide-details
class="ml-4"
style="max-width: 200px"
prepend-inner-icon="mdi-magnify"
clearable
/>
</VCardTitle>
<VDivider class="search-divider" />
<VCardText style="max-height: 420px" class="overflow-y-auto px-4 py-4">
<!-- 站点列表 -->
<div v-if="filteredSites.length > 0">
<!-- 选择操作 -->
<div class="d-flex align-center mb-4">
<VBtn
size="small"
:color="selectedSites.length < allSites.length ? 'primary' : 'error'"
@click="checkAllSitesorNot"
class="me-2"
variant="flat"
rounded="pill"
elevation="0"
>
<VIcon start size="small">
{{ selectedSites.length < allSites.length ? 'mdi-check-all' : 'mdi-close-circle-outline' }}
</VIcon>
{{ checkAllText }}
</VBtn>
<div class="text-body-2 font-weight-medium" :class="selectedSites.length > 0 ? 'text-primary' : 'text-medium-emphasis'">
已选择 {{ selectedSites.length }}/{{ allSites.length }} 个站点
</div>
</div>
<!-- 站点选择器 -->
<VRow dense>
<VCol
v-for="site in filteredSites"
:key="site.id"
cols="6"
sm="6"
md="4"
>
<VHover v-slot="{ isHovering, props }">
<div
v-bind="props"
:class="[
'site-checkbox-wrapper pa-2 pa-sm-3 rounded-lg d-flex align-center',
{
'site-selected': selectedSites.includes(site.id),
'site-hover': isHovering && !selectedSites.includes(site.id)
}
]"
@click="() => {
const index = selectedSites.indexOf(site.id);
if (index === -1) {
selectedSites.push(site.id);
} else {
selectedSites.splice(index, 1);
}
}"
>
<VIcon
:icon="selectedSites.includes(site.id) ? 'mdi-check-circle' : 'mdi-checkbox-blank-circle-outline'"
:color="selectedSites.includes(site.id) ? 'primary' : 'medium-emphasis'"
class="me-2"
size="small"
/>
<span :class="[
'text-body-2 site-name',
{ 'font-weight-medium': selectedSites.includes(site.id) }
]">
{{ site.name }}
</span>
</div>
</VHover>
</VCol>
</VRow>
</div>
<div v-else class="text-center py-8 empty-site-state">
<div class="search-icon-wrapper mb-4 mx-auto warning">
<VIcon icon="mdi-alert-circle-outline" size="large" color="warning" />
</div>
<div class="text-h6 font-weight-medium mb-2">没有找到匹配的站点</div>
<div class="text-subtitle-1 text-medium-emphasis mb-4">
{{ siteFilter ? '请尝试修改过滤条件' : '站点数据加载失败,请刷新页面重试' }}
</div>
<VBtn
v-if="siteFilter"
color="primary"
variant="flat"
class="mt-3"
prepend-icon="mdi-refresh"
rounded="pill"
elevation="0"
@click="siteFilter = ''"
>
清除过滤条件
</VBtn>
<VBtn
v-else
color="primary"
variant="flat"
class="mt-3"
prepend-icon="mdi-refresh"
rounded="pill"
elevation="0"
@click="getSiteCategories"
>
重新加载站点
</VBtn>
</div>
</VCardText>
<VDivider class="search-divider" />
<VCardActions class="pa-4">
<VSpacer />
<VBtn
color="grey-darken-1"
variant="text"
@click="showSiteDialog = false"
rounded="pill"
class="mr-2 d-flex align-center justify-center"
>
取消
</VBtn>
<VBtn
color="success"
variant="flat"
@click="showSiteDialog = false"
rounded="pill"
elevation="0"
class="mr-2 d-flex align-center justify-center"
:disabled="selectedSites.length === 0"
>
确定
</VBtn>
<VBtn
color="primary"
variant="flat"
:disabled="selectedSites.length === 0"
@click="() => { searchTorrent(); showSiteDialog = false; }"
prepend-icon="mdi-magnify"
rounded="pill"
elevation="0"
class="d-flex align-center justify-center"
>
直接搜索
</VBtn>
</VCardActions>
</VCard>
</VDialog>
<SearchSiteDialog
v-if="chooseSiteDialog"
v-model="chooseSiteDialog"
:sites="allSites"
:selected="selectedSites"
:savebtn="true"
@search="searchSites"
@close="chooseSiteDialog = false"
@reload="getSiteCategories"
@save="chooseSitesDone"
/>
</template>
<style scoped>
@@ -945,7 +758,7 @@ onMounted(() => {
.close-btn {
position: absolute;
right: 1.2rem;
top: 1.2rem;
top: 1.4rem;
background-color: rgba(var(--v-theme-on-surface), 0.04);
border-radius: 50%;
width: 36px;
@@ -1027,35 +840,10 @@ onMounted(() => {
background-color: rgb(var(--v-theme-background));
}
.site-checkbox-wrapper {
cursor: pointer;
transition: transform 0.2s ease, background-color 0.2s ease;
.site-search-card {
border: 1px solid rgba(var(--v-theme-on-surface), 0.08);
}
.site-checkbox-wrapper:hover {
transform: translateY(-2px);
}
.site-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.site-selected {
background-color: rgba(var(--v-theme-primary), 0.08);
color: rgb(var(--v-theme-primary));
border-color: rgba(var(--v-theme-primary), 0.2);
}
.site-hover {
background-color: rgba(var(--v-theme-primary), 0.04);
}
.site-chips-container {
border-radius: 10px;
background-color: rgba(var(--v-theme-surface-variant), 0.06);
border-radius: 14px;
background-color: rgb(var(--v-theme-surface));
}
.site-chip {
@@ -1068,12 +856,6 @@ onMounted(() => {
color: rgb(var(--v-theme-primary));
}
.site-search-card {
border: 1px solid rgba(var(--v-theme-on-surface), 0.08);
border-radius: 14px;
background-color: rgb(var(--v-theme-surface));
}
.search-btn {
min-width: 70px;
font-weight: 500;
@@ -1111,26 +893,31 @@ onMounted(() => {
padding: 0 12px;
}
.site-chips-container {
border-radius: 10px;
background-color: rgba(var(--v-theme-surface-variant), 0.06);
}
@media (max-width: 600px) {
.search-box-container {
padding: 16px;
}
.search-input {
font-size: 14px;
}
.close-btn {
right: 0.8rem;
top: 0.8rem;
top: 1rem;
width: 32px;
height: 32px;
}
.site-chips-container {
padding: 6px 8px;
}
.site-select-btn {
min-height: 28px;
font-size: 11px;

View File

@@ -0,0 +1,224 @@
<script setup lang="ts">
import type { Site, Plugin, Subscribe } from '@/api/types'
import { popScopeId, PropType } from 'vue'
const props = defineProps({
sites: {
type: Array as PropType<Site[]>,
required: true,
},
selected: Array as PropType<Number[]>,
savebtn: {
type: Boolean,
default: false,
},
})
// 定义事件
const emit = defineEmits(['close', 'search', 'reload', 'save'])
// 过滤词
const siteFilter = ref('')
// 已选择站点
const selectedSites = ref<any[]>(props.selected || [])
watch(() => props.selected, value => {
if (selectedSites.value.length == 0 && value) {
selectedSites.value = value
}
})
// 全选/全不选按钮文字
const checkAllText = computed(() => {
return selectedSites.value.length < props.sites?.length ? '选择全部' : '取消全选'
})
// 全选/全不选
const checkAllSitesorNot = () => {
if (selectedSites.value.length < props.sites?.length) {
selectedSites.value = props.sites?.map((item: Site) => item.id)
} else {
selectedSites.value = []
}
}
// 根据筛选条件过滤站点
const filteredSites = computed(() => {
if (!siteFilter.value) return props.sites
const filter = siteFilter.value.toLowerCase()
return props.sites?.filter((site: Site) => site.name.toLowerCase().includes(filter))
})
</script>
<template>
<!-- 手动整理进度框 -->
<VDialog max-width="40rem" fullscreen-mobile>
<VCard class="site-dialog">
<VCardTitle class="d-flex align-center pa-4">
<span class="text-h6 font-weight-medium">选择搜索站点</span>
<VSpacer />
<VTextField
v-model="siteFilter"
placeholder="过滤站点..."
density="compact"
variant="outlined"
hide-details
class="ml-4"
style="max-width: 200px"
prepend-inner-icon="mdi-magnify"
clearable
/>
</VCardTitle>
<VDivider class="search-divider" />
<VCardText style="max-height: 420px" class="overflow-y-auto px-4 py-4">
<!-- 站点列表 -->
<div v-if="filteredSites.length > 0">
<!-- 选择操作 -->
<div class="d-flex align-center mb-4">
<VBtn
size="small"
:color="selectedSites.length < sites.length ? 'primary' : 'error'"
@click="checkAllSitesorNot"
class="me-2"
rounded="pill"
variant="flat"
>
<VIcon start size="small">
{{ selectedSites.length < sites.length ? 'mdi-check-all' : 'mdi-close-circle-outline' }}
</VIcon>
{{ checkAllText }}
</VBtn>
<div
class="text-body-2 font-weight-medium"
:class="selectedSites.length > 0 ? 'text-primary' : 'text-medium-emphasis'"
>
已选择 {{ selectedSites.length }}/{{ sites.length }} 个站点
</div>
</div>
<!-- 站点选择器 -->
<VRow dense>
<VCol v-for="site in filteredSites" :key="site.id" cols="6" sm="6" md="4">
<VHover v-slot="{ isHovering, props }">
<div
v-bind="props"
:class="[
'site-checkbox-wrapper pa-2 pa-sm-3 rounded-lg d-flex align-center',
{
'site-selected': selectedSites.includes(site.id),
'site-hover': isHovering && !selectedSites.includes(site.id),
},
]"
@click="
() => {
const index = selectedSites.indexOf(site.id)
if (index === -1) {
selectedSites.push(site.id)
} else {
selectedSites.splice(index, 1)
}
}
"
>
<VIcon
:icon="selectedSites.includes(site.id) ? 'mdi-check-circle' : 'mdi-checkbox-blank-circle-outline'"
:color="selectedSites.includes(site.id) ? 'primary' : 'medium-emphasis'"
class="me-2"
size="small"
/>
<span :class="['text-body-2 site-name', { 'font-weight-medium': selectedSites.includes(site.id) }]">
{{ site.name }}
</span>
</div>
</VHover>
</VCol>
</VRow>
</div>
<div v-else class="text-center py-8 empty-site-state">
<div class="search-icon-wrapper mb-4 mx-auto warning">
<VIcon icon="mdi-alert-circle-outline" size="large" color="warning" />
</div>
<div class="text-h6 font-weight-medium mb-2">没有找到匹配的站点</div>
<div class="text-subtitle-1 text-medium-emphasis mb-4">
{{ siteFilter ? '请尝试修改过滤条件' : '站点数据加载失败,请刷新页面重试' }}
</div>
<VBtn
v-if="siteFilter"
color="primary"
variant="flat"
class="mt-3"
prepend-icon="mdi-refresh"
@click="siteFilter = ''"
>
重置
</VBtn>
<VBtn v-else color="primary" variant="flat" class="mt-3" prepend-icon="mdi-refresh" @click="emit('reload')">
重新加载站点
</VBtn>
</div>
</VCardText>
<VDivider class="search-divider" />
<VCardActions class="pa-4">
<VSpacer />
<VBtn
color="grey-darken-1"
variant="text"
@click="emit('close')"
class="mr-2 d-flex align-center justify-center"
>
取消
</VBtn>
<VBtn
v-if="savebtn"
color="success"
variant="flat"
@click="emit('save', selectedSites)"
class="mr-2 d-flex align-center justify-center"
:disabled="selectedSites.length === 0"
>
确定
</VBtn>
<VBtn
color="primary"
variant="flat"
:disabled="selectedSites.length === 0"
@click="emit('search', selectedSites)"
prepend-icon="mdi-magnify"
class="d-flex align-center justify-center px-5"
>
搜索
</VBtn>
</VCardActions>
</VCard>
</VDialog>
</template>
<style scoped>
.site-checkbox-wrapper {
cursor: pointer;
transition: transform 0.2s ease, background-color 0.2s ease;
border: 1px solid rgba(var(--v-theme-on-surface), 0.08);
}
.site-checkbox-wrapper:hover {
transform: translateY(-2px);
}
.site-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.site-selected {
background-color: rgba(var(--v-theme-primary), 0.08);
color: rgb(var(--v-theme-primary));
border-color: rgba(var(--v-theme-primary), 0.2);
}
.site-hover {
background-color: rgba(var(--v-theme-primary), 0.04);
}
</style>

View File

@@ -5,14 +5,10 @@ import { doneNProgress, startNProgress } from '@/api/nprogress'
import { numberValidator, requiredValidator } from '@/@validators'
import api from '@/api'
import { useDisplay } from 'vuetify'
import { useConfirm } from 'vuetify-use-dialog'
// 显示器宽度
const display = useDisplay()
// 确认框
const createConfirm = useConfirm()
// 输入参数
const props = defineProps({
siteid: Number,
@@ -108,25 +104,6 @@ async function addSite() {
doneNProgress()
}
// 调用API删除站点信息
async function deleteSiteInfo() {
const isConfirmed = await createConfirm({
title: '确认',
content: `是否确认删除站点?`,
})
if (!isConfirmed) return
try {
const result: { [key: string]: any } = await api.delete(`site/${siteForm.value?.id}`)
if (result.success) emit('remove')
else $toast.error(`${siteForm.value?.name} 删除失败:${result.message}`)
} catch (error) {
$toast.error(`${siteForm.value?.name} 删除失败!`)
console.error(error)
}
}
// 调用API更新站点信息
async function updateSiteInfo() {
startNProgress()
@@ -166,7 +143,7 @@ onMounted(async () => {
</script>
<template>
<VDialog scrollable :close-on-back="false" eager max-width="50rem" :fullscreen="!display.mdAndUp.value">
<VDialog scrollable :close-on-back="false" eager max-width="45rem" :fullscreen="!display.mdAndUp.value">
<VCard
:title="`${props.oper === 'add' ? '新增' : '编辑'}站点${props.oper !== 'add' ? ` - ${siteForm.name}` : ''}`"
class="rounded-t"
@@ -338,9 +315,6 @@ onMounted(async () => {
</VForm>
</VCardText>
<VCardActions class="pt-3">
<VBtn v-if="props.oper !== 'add'" color="error" @click="deleteSiteInfo" variant="outlined" class="me-3">
删除
</VBtn>
<VSpacer />
<VBtn
v-if="props.oper === 'add'"

View File

@@ -295,7 +295,7 @@ onBeforeMount(async () => {
<VCard>
<VCardText class="d-flex align-center">
<div class="d-flex justify-space-between" style="inline-size: 100%">
<div class="d-flex flex-column gap-y-1">
<div class="d-flex flex-column gap-y-1 overflow-hidden">
<span class="text-base">用户等级</span>
<h5 class="text-h5 d-flex align-center gap-2 text-wrap">
{{ siteData?.user_level || '无' }}
@@ -313,7 +313,7 @@ onBeforeMount(async () => {
<VCard>
<VCardText class="d-flex align-center">
<div class="d-flex justify-space-between" style="inline-size: 100%">
<div class="d-flex flex-column gap-y-1">
<div class="d-flex flex-column gap-y-1 overflow-hidden">
<span class="text-base">积分</span>
<h5 class="text-h5 d-flex align-center gap-2 text-wrap">
{{ siteData?.bonus?.toLocaleString() }}
@@ -355,7 +355,7 @@ onBeforeMount(async () => {
<VCard>
<VCardText class="d-flex align-center">
<div class="d-flex justify-space-between" style="inline-size: 100%">
<div class="d-flex flex-column gap-y-1">
<div class="d-flex flex-column gap-y-1 overflow-hidden">
<span class="text-base">总上传量</span>
<h5 class="text-h5 d-flex align-center gap-2 text-wrap">
{{ formatFileSize(siteData?.upload || 0) }}
@@ -376,7 +376,7 @@ onBeforeMount(async () => {
<VCard>
<VCardText class="d-flex align-center">
<div class="d-flex justify-space-between" style="inline-size: 100%">
<div class="d-flex flex-column gap-y-1">
<div class="d-flex flex-column gap-y-1 overflow-hidden">
<span class="text-base">总下载量</span>
<h5 class="text-h5 d-flex align-center gap-2 text-wrap">
{{ formatFileSize(siteData?.download || 0) }}
@@ -397,7 +397,7 @@ onBeforeMount(async () => {
<VCard>
<VCardText class="d-flex align-center">
<div class="d-flex justify-space-between" style="inline-size: 100%">
<div class="d-flex flex-column gap-y-1">
<div class="d-flex flex-column gap-y-1 overflow-hidden">
<span class="text-base">总做种数</span>
<h5 class="text-h5 d-flex align-center gap-2 text-wrap">
{{ siteData?.seeding?.toLocaleString() }}
@@ -418,7 +418,7 @@ onBeforeMount(async () => {
<VCard>
<VCardText class="d-flex align-center">
<div class="d-flex justify-space-between" style="inline-size: 100%">
<div class="d-flex flex-column gap-y-1">
<div class="d-flex flex-column gap-y-1 overflow-hidden">
<span class="text-base">总做种体积</span>
<h5 class="text-h5 d-flex align-center gap-2 text-wrap">
{{ formatFileSize(siteData?.seeding_size || 0) }}
@@ -439,7 +439,7 @@ onBeforeMount(async () => {
<VCard>
<VCardText class="d-flex align-center">
<div class="d-flex justify-space-between" style="inline-size: 100%">
<div class="d-flex flex-column gap-y-1">
<div class="d-flex flex-column gap-y-1 overflow-hidden">
<span class="text-base">加入时间</span>
<h5 class="text-h5 d-flex align-center gap-2 text-wrap">
{{ siteData?.join_at?.split(' ')[0] }}

View File

@@ -5,7 +5,6 @@ import api from '@/api'
import type { DownloaderConf, FilterRuleGroup, Site, Subscribe, TransferDirectoryConf } from '@/api/types'
import { useDisplay } from 'vuetify'
import { useConfirm } from 'vuetify-use-dialog'
import { VTextarea, VTextField } from 'vuetify/lib/components/index.mjs'
// 显示器宽度
const display = useDisplay()
@@ -53,6 +52,7 @@ const subscribeForm = ref<Subscribe>({
downloader: '',
date: '',
show_edit_dialog: false,
episode_group: '',
})
// 提示框
@@ -61,6 +61,47 @@ const $toast = useToast()
// 下载器选项
const downloaderOptions = ref<{ title: string; value: string }[]>([])
// 所有剧集组
const episodeGroups = ref<{ [key: string]: any }[]>([])
// 剧集组选项
const episodeGroupOptions = computed(() => {
return (episodeGroups.value as { id: number; name: string; group_count: number; episode_count: number }[]).map(
item => {
return {
title: item.name,
subtitle: `${item.group_count} 季 • ${item.episode_count}`,
value: item.id,
}
},
)
})
// 生成1到100季的下拉框选项
const seasonItems = ref(
Array.from({ length: 101 }, (_, i) => i).map(item => ({
title: `${item}`,
value: item,
})),
)
// 剧集组选项属性
function episodeGroupItemProps(item: { title: string; subtitle: string }) {
return {
title: item.title,
subtitle: item.subtitle,
}
}
// 查询所有剧集组
async function getEpisodeGroups() {
try {
episodeGroups.value = await api.get(`media/groups/${subscribeForm.value.tmdbid}`)
} catch (error) {
console.error(error)
}
}
async function loadDownloaderSetting() {
try {
const downloaders: DownloaderConf[] = await api.get('download/clients')
@@ -178,6 +219,8 @@ async function getSubscribeInfo() {
subscribeForm.value = result
subscribeForm.value.best_version = subscribeForm.value.best_version === 1
subscribeForm.value.search_imdbid = subscribeForm.value.search_imdbid === 1
// 加载剧集组
if (subscribeForm.value.type == '电视剧') getEpisodeGroups()
} catch (e) {
console.log(e)
}
@@ -317,7 +360,7 @@ onMounted(() => {
</script>
<template>
<VDialog scrollable max-width="50rem" :fullscreen="!display.mdAndUp.value">
<VDialog scrollable max-width="45rem" :fullscreen="!display.mdAndUp.value">
<VCard
:title="`${
props.default
@@ -480,7 +523,7 @@ onMounted(() => {
</VCol>
</VRow>
<VRow>
<VCol cols="12" md="6">
<VCol cols="12">
<VSelect
v-model="subscribeForm.filter_groups"
:items="filterRuleGroupOptions"
@@ -492,7 +535,26 @@ onMounted(() => {
persistent-hint
/>
</VCol>
<VCol cols="12" md="6" v-if="!props.default">
<VCol v-if="!props.default && subscribeForm.type === '电视剧'" cols="12" md="6">
<VSelect
v-model="subscribeForm.episode_group"
:items="episodeGroupOptions"
:item-props="episodeGroupItemProps"
label="指定剧集组"
hint="按特定剧集组识别和刮削"
persistent-hint
/>
</VCol>
<VCol v-if="!props.default && subscribeForm.type === '电视剧'" cols="12" md="6">
<VSelect
v-model="subscribeForm.season"
:items="seasonItems"
label="指定季"
hint="指定任意季订阅"
persistent-hint
/>
</VCol>
<VCol cols="12" v-if="!props.default">
<VTextField
v-model="subscribeForm.media_category"
label="自定义类别"

View File

@@ -0,0 +1,262 @@
<script lang="ts" setup>
import api from '@/api'
import { MediaInfo, MediaSeason, NotExistMediaInfo } from '@/api/types'
import { PropType } from 'vue'
import NoDataFound from '@/components/NoDataFound.vue'
// 定义事件
const emit = defineEmits(['subscribe', 'close'])
// 定义输入
const props = defineProps({
media: Object as PropType<MediaInfo>,
})
// 从 provide 中获取全局设置
const globalSettings: any = inject('globalSettings')
// 季详情
const seasonInfos = ref<MediaSeason[]>([])
// 选中的订阅季
const seasonsSelected = ref<MediaSeason[]>([])
// 各季缺失状态0-已入库 1-部分缺失 2-全部缺失,没有数据也是已入库
const seasonsNotExisted = ref<{ [key: number]: number }>({})
// 是否刷新过
const isRefreshed = ref(false)
// 所有剧集组
const episodeGroups = ref<{ [key: string]: any }[]>([])
// 当前选择剧集组
const episodeGroup = ref('')
// 剧集组选项属性
function episodeGroupItemProps(item: { title: string; subtitle: string }) {
return {
title: item.title,
subtitle: item.subtitle,
}
}
// 剧集组选项
const episodeGroupOptions = computed(() => {
let options = (episodeGroups.value as { id: string; name: string; group_count: number; episode_count: number }[]).map(
item => {
return {
title: item.name,
subtitle: `${item.group_count} 季 • ${item.episode_count}`,
value: item.id,
}
},
)
// 添加不使用选项
options.unshift({
title: '默认',
subtitle: `${seasonInfos.value.length}`,
value: '',
})
return options
})
// 获得mediaid
function getMediaId() {
if (props.media?.tmdb_id) return `tmdb:${props.media?.tmdb_id}`
else if (props.media?.douban_id) return `douban:${props.media?.douban_id}`
else if (props.media?.bangumi_id) return `bangumi:${props.media?.bangumi_id}`
else return `${props.media?.mediaid_prefix}:${props.media?.media_id}`
}
// 查询所有剧集组
async function getEpisodeGroups() {
try {
episodeGroups.value = await api.get(`media/groups/${props.media?.tmdb_id}`)
} catch (error) {
console.error(error)
}
}
// 查询TMDB的所有季信息
async function getMediaSeasons() {
try {
seasonInfos.value = await api.get('media/seasons', {
params: {
mediaid: getMediaId(),
title: props.media?.title,
year: props.media?.year,
season: props.media?.season,
},
})
isRefreshed.value = true
} catch (error) {
console.error(error)
}
}
// 查询剧集组的剧集
async function getGroupSeasons() {
if (!episodeGroup.value) return
isRefreshed.value = false
try {
seasonInfos.value = await api.get(`media/group/seasons/${episodeGroup.value}`)
} catch (error) {
console.error(error)
}
isRefreshed.value = true
}
// 检查所有季的缺失状态(数据库)
async function checkSeasonsNotExists() {
// 开始处理
try {
let tmpMedia = props.media ?? { episode_group: '' }
if (episodeGroup.value) tmpMedia.episode_group = episodeGroup.value
else tmpMedia.episode_group = ''
const result: NotExistMediaInfo[] = await api.post('mediaserver/notexists', tmpMedia)
if (result) {
result.forEach(item => {
// 0-已入库 1-部分缺失 2-全部缺失
let state = 0
if (item.episodes.length === 0) state = 2
else if (item.episodes.length < item.total_episode) state = 1
seasonsNotExisted.value[item.season] = state
})
}
} catch (error) {
console.error(error)
}
}
// 计算存在状态的颜色
function getExistColor(season: number) {
const state = seasonsNotExisted.value[season]
if (!state) return 'success'
if (state === 1) return 'warning'
else if (state === 2) return 'error'
else return 'success'
}
// 计算存在状态的文本
function getExistText(season: number) {
const state = seasonsNotExisted.value[season]
if (!state) return '已入库'
if (state === 1) return '部分缺失'
else if (state === 2) return '缺失'
else return '已入库'
}
// 拼装季图片地址
function getSeasonPoster(posterPath: string) {
if (!posterPath) return props.media?.poster_path
return `https://${globalSettings.TMDB_IMAGE_DOMAIN}/t/p/w500${posterPath}`
}
// 将yyyy-mm-dd转换为yyyy年mm月dd日
function formatAirDate(airDate: string) {
if (!airDate) return ''
const date = new Date(airDate.replaceAll(/-/g, '/'))
return `${date.getFullYear()}${date.getMonth() + 1}${date.getDate()}`
}
// 从yyyy-mm-dd中提取年份
function getYear(airDate: string) {
if (!airDate) return ''
const date = new Date(airDate.replaceAll(/-/g, '/'))
return date.getFullYear()
}
function subscribeSeasons() {
emit('subscribe', seasonsSelected.value, seasonsNotExisted.value, episodeGroup.value)
}
watchEffect(() => {
if (episodeGroup.value) getGroupSeasons()
else getMediaSeasons()
checkSeasonsNotExists()
})
onMounted(async () => {
getMediaSeasons()
getEpisodeGroups()
checkSeasonsNotExists()
})
</script>
<template>
<VBottomSheet inset scrollable>
<VCard class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VCardItem>
<VCardTitle class="pe-10"> 订阅 - {{ props.media?.title }} </VCardTitle>
</VCardItem>
<VDivider />
<VCardText>
<VSelect
v-model="episodeGroup"
:items="episodeGroupOptions"
:item-props="episodeGroupItemProps"
label="选择剧集组"
persistent-hint
/>
<LoadingBanner v-if="!isRefreshed" class="mt-5" />
<div v-else-if="seasonInfos.length > 0">
<VList v-model:selected="seasonsSelected" lines="three" select-strategy="classic">
<VListItem v-for="(item, i) in seasonInfos" :key="i" :value="item">
<template #prepend>
<VImg
height="90"
width="60"
:src="getSeasonPoster(item.poster_path || '')"
aspect-ratio="2/3"
class="object-cover rounded shadow ring-gray-500 me-3"
cover
>
<template #placeholder>
<div class="w-full h-full">
<VSkeletonLoader class="object-cover aspect-w-2 aspect-h-3" />
</div>
</template>
</VImg>
</template>
<VListItemTitle> {{ item.season_number }} </VListItemTitle>
<VListItemSubtitle class="mt-1 me-2">
<VChip v-if="item.vote_average" color="primary" size="small" class="mb-1">
<VIcon icon="mdi-star" /> {{ item.vote_average }}
</VChip>
{{ getYear(item.air_date || '') }} {{ item.episode_count }}
</VListItemSubtitle>
<VListItemSubtitle>
{{ media?.title }} {{ item.season_number }} 季于 {{ formatAirDate(item.air_date || '') }} 首播
</VListItemSubtitle>
<VListItemSubtitle>
<VChip
v-if="seasonsNotExisted"
class="mt-2"
size="small"
:color="getExistColor(item.season_number || 0)"
>
{{ getExistText(item.season_number || 0) }}
</VChip>
</VListItemSubtitle>
<template #append="{ isSelected }">
<VListItemAction start>
<VSwitch :model-value="isSelected" />
</VListItemAction>
</template>
</VListItem>
</VList>
</div>
<NoDataFound v-else errorTitle="出错啦!" :errorDescription="`${props.media?.title} 未查询到季集信息`" />
</VCardText>
<div class="my-2 text-center">
<VBtn :disabled="seasonsSelected.length === 0" width="30%" @click="subscribeSeasons">
{{ seasonsSelected.length === 0 ? '请选择订阅季' : '提交订阅' }}
</VBtn>
</div>
</VCard>
</VBottomSheet>
</template>

View File

@@ -58,7 +58,7 @@ const statusItems = [
// 扩展User类型以包含note字段
interface ExtendedUser extends User {
nickname?: string;
nickname?: string
}
// 用户编辑表单数据
@@ -79,7 +79,7 @@ const userForm = ref<ExtendedUser>({
vocechat_userid: null,
synologychat_userid: null,
},
nickname: '', // 昵称字段
nickname: '', // 昵称字段
})
// 更新头像
@@ -196,15 +196,15 @@ async function updateUser() {
}
userForm.value.password = newPassword.value
}
// 将nickname保存到settings中后端可以直接处理JSON对象
if (userForm.value.nickname) {
if (!userForm.value.settings) {
userForm.value.settings = {};
userForm.value.settings = {}
}
userForm.value.settings.nickname = userForm.value.nickname;
userForm.value.settings.nickname = userForm.value.nickname
}
const oldUserName = userForm.value.name
userForm.value.name = currentUserName.value
const oldAvatar = userForm.value.avatar
@@ -213,10 +213,10 @@ async function updateUser() {
startNProgress()
try {
// 确保昵称保存,使用一个临时变量存储完整数据
const userData = { ...userForm.value };
const userData = { ...userForm.value }
const result: { [key: string]: any } = await api.put('user/', userData)
if (result.success) {
if (oldUserName !== currentUserName.value) {
$toast.success(`${oldUserName}】更名【${currentUserName.value}】, 更新成功!`)
@@ -286,7 +286,7 @@ onMounted(() => {
</script>
<template>
<VDialog scrollable :close-on-back="false" eager max-width="50rem" :fullscreen="!display.mdAndUp.value">
<VDialog scrollable :close-on-back="false" eager max-width="40rem" :fullscreen="!display.mdAndUp.value">
<VCard
:title="`${props.oper === 'add' ? '新增' : '编辑'}用户${props.oper !== 'add' ? ` - ${userName}` : ''}`"
class="rounded-t"

View File

@@ -30,10 +30,19 @@ const inProps = defineProps({
},
sort: String,
listStyle: String,
showTree: Boolean,
})
// 对外事件
const emit = defineEmits(['loading', 'pathchanged', 'refreshed', 'filedeleted', 'renamed', 'items-updated'])
const emit = defineEmits([
'loading',
'pathchanged',
'refreshed',
'filedeleted',
'renamed',
'items-updated',
'switch-tree',
])
// 确认框
const createConfirm = useConfirm()
@@ -369,6 +378,11 @@ function formatTime(timestape: number) {
return new Date(timestape * 1000).toLocaleString()
}
// 切换文件树显示
function switchFileTree(state: boolean) {
emit('switch-tree', state)
}
// 监听refreshPending变化
watch(
() => inProps.refreshpending,
@@ -533,8 +547,12 @@ onMounted(() => {
</script>
<template>
<VCard class="d-flex flex-column w-full h-full">
<VCard class="d-flex flex-column w-full h-full rounded-t-0" :class="{ 'rounded-s-0': showTree }">
<VToolbar v-if="!loading" density="compact" flat color="gray">
<IconBtn v-if="display.mdAndUp.value">
<VIcon v-if="showTree" icon="mdi-file-tree" @click="switchFileTree(false)" />
<VIcon v-else icon="mdi-file-tree-outline" @click="switchFileTree(true)" />
</IconBtn>
<VTextField
v-if="!isFile"
v-model="filter"

View File

@@ -259,7 +259,7 @@ function getIndentLevel(path: string, ancestorPath: string) {
</script>
<template>
<VCard class="file-navigator" v-if="!isMobile">
<VCard class="file-navigator rounded-e-0 rounded-t-0" v-if="!isMobile">
<div class="tree-container">
<!-- 根目录项 -->
<div
@@ -387,41 +387,41 @@ function getIndentLevel(path: string, ancestorPath: string) {
<style lang="scss" scoped>
.file-navigator {
width: 240px;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
flex-direction: column;
flex-shrink: 0;
border-bottom-left-radius: 12px;
background: rgb(var(--v-table-header-background));
block-size: 100%;
border-end-start-radius: 12px;
inline-size: 240px;
}
.navigator-header {
padding: 12px 16px;
display: flex;
align-items: center;
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
border-block-end: 1px solid rgba(0, 0, 0, 8%);
padding-block: 12px;
padding-inline: 16px;
}
.tree-container {
overflow: hidden auto;
flex: 1;
overflow-y: auto;
overflow-x: hidden;
}
.tree-item-container {
width: 100%;
inline-size: 100%;
}
.tree-item {
display: flex;
box-sizing: border-box;
align-items: center;
cursor: pointer;
max-inline-size: 100%;
min-inline-size: 100%;
transition: background-color 0.2s ease;
min-width: 100%;
max-width: 100%;
box-sizing: border-box;
&:hover {
background-color: rgba(var(--v-theme-primary), 0.05);
@@ -433,25 +433,27 @@ function getIndentLevel(path: string, ancestorPath: string) {
}
.folder-toggle {
width: 16px;
height: 16px;
display: flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
margin-right: 4px;
flex-shrink: 0;
padding: 6px 0px 6px 12px;
block-size: 16px;
inline-size: 16px;
margin-inline-end: 4px;
padding-block: 6px;
padding-inline: 12px 0;
}
.folder-content {
display: flex;
align-items: center;
flex: 1;
min-width: 0;
overflow: hidden;
white-space: nowrap;
flex: 1;
align-items: center;
min-inline-size: 0;
padding-block: 6px;
padding-inline: 8px 16px;
text-overflow: ellipsis;
padding: 6px 16px 6px 8px;
white-space: nowrap;
}
.root-item {
@@ -459,25 +461,26 @@ function getIndentLevel(path: string, ancestorPath: string) {
}
.folder-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 150px;
display: inline-block;
overflow: hidden;
max-inline-size: 150px;
text-overflow: ellipsis;
white-space: nowrap;
}
.subdirectory-container {
width: 100%;
inline-size: 100%;
}
.tree-loading {
display: flex;
align-items: center;
padding: 4px 16px;
color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
padding-block: 4px;
padding-inline: 16px;
}
.pl-8 {
padding-left: 20px !important;
padding-inline-start: 20px !important;
}
</style>

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup>
import * as Mousetrap from 'mousetrap'
import SearchBarView from '@/views/system/SearchBarView.vue'
import SearchBarDialog from '@/components/dialog/SearchBarDialog.vue'
import { useDisplay } from 'vuetify'
const display = useDisplay()
@@ -36,7 +36,7 @@ const metaKey = computed(() => (isMac() ? '⌘+K' : 'Ctrl+K'))
</span>
</div>
<!-- 搜索弹窗 -->
<SearchBarView v-model="searchDialog" v-if="searchDialog" @close="searchDialog = false" />
<SearchBarDialog v-model="searchDialog" v-if="searchDialog" @close="searchDialog = false" />
</template>
<style type="scss" scoped>
.meta-key {

View File

@@ -8,9 +8,10 @@ import NoDataFound from '@/components/NoDataFound.vue'
import { doneNProgress, startNProgress } from '@/api/nprogress'
import { formatSeason } from '@/@core/utils/formatters'
import router from '@/router'
import SubscribeEditDialog from '@/components/dialog/SubscribeEditDialog.vue'
import { isNullOrEmptyObject } from '@/@core/utils'
import { useUserStore } from '@/stores'
import SubscribeEditDialog from '@/components/dialog/SubscribeEditDialog.vue'
import SearchSiteDialog from '@/components/dialog/SearchSiteDialog.vue'
// 输入参数
const mediaProps = defineProps({
@@ -68,17 +69,8 @@ const selectedSites = ref<number[]>([])
// 搜索方式 title/imdbid
const searchType = ref('title')
// 全选/全不选按钮文字
const checkAllText = computed(() => (selectedSites.value.length === allSites.value.length ? '全不选' : '全选'))
// 全选/全不选
function checkAllSitesorNot() {
if (selectedSites.value.length === allSites.value.length) {
selectedSites.value = []
} else {
selectedSites.value = allSites.value.map(item => item.id)
}
}
// 选择站点对话框
const chooseSiteDialog = ref(false)
// 查询所有站点
async function querySites() {
@@ -503,10 +495,20 @@ function onSubscribeEditRemove() {
}
// 点击搜索
async function clickSearch() {
if (allSites.value?.length > 0) return
querySites()
querySelectedSites()
async function clickSearch(type: string) {
searchType.value = type
if (allSites.value?.length == 0) {
querySites()
querySelectedSites()
}
chooseSiteDialog.value = true
}
// 搜索多站点
function searchSites(sites: number[]) {
chooseSiteDialog.value = false
selectedSites.value = sites
handleSearch()
}
onBeforeMount(() => {
@@ -570,42 +572,18 @@ onBeforeMount(() => {
variant="tonal"
color="info"
class="mb-2"
@click="clickSearch"
>
<template #prepend>
<VIcon icon="mdi-magnify" />
</template>
搜索资源
<VMenu activator="parent" close-on-content-click max-width="450">
<VMenu activator="parent" close-on-content-click>
<VList>
<VListItem>
<VBtnToggle v-model="searchType" color="primary" @click.stop>
<VBtn value="title">标题</VBtn>
<VBtn value="imdbid" v-show="mediaDetail.imdb_id">IMDB链接</VBtn>
</VBtnToggle>
<VListItem @click="clickSearch('title')">
<VListItemTitle>标题</VListItemTitle>
</VListItem>
<VListItem>
<VChipGroup v-model="selectedSites" column multiple @click.stop>
<VChip
v-for="site in allSites"
:key="site.id"
:color="selectedSites.includes(site.id) ? 'primary' : ''"
filter
variant="outlined"
:value="site.id"
size="small"
>
{{ site.name }}
</VChip>
</VChipGroup>
<div>
<VBtn size="small" variant="text" @click.stop="checkAllSitesorNot">
{{ checkAllText }}
</VBtn>
</div>
</VListItem>
<VListItem>
<VBtn @click="handleSearch" block>搜索</VBtn>
<VListItem @click="clickSearch('imdb')">
<VListItemTitle>IMDB链接</VListItemTitle>
</VListItem>
</VList>
</VMenu>
@@ -974,6 +952,15 @@ onBeforeMount(() => {
@save="subscribeEditDialog = false"
@remove="onSubscribeEditRemove"
/>
<!-- 站点选择对话框 -->
<SearchSiteDialog
v-if="chooseSiteDialog"
v-model="chooseSiteDialog"
:sites="allSites"
:selected="selectedSites"
@search="searchSites"
@close="chooseSiteDialog = false"
/>
</template>
<style lang="scss" scoped>

View File

@@ -198,7 +198,7 @@ watch(filterParams, () => {
<div class="mr-5">
<VLabel>评分</VLabel>
</div>
<VSlider v-model="filterParams.vote_average" thumb-label max="10" min="0" class="align-center" hide-details>
<VSlider v-model="filterParams.vote_average" thumb-label max="10" min="0" :step="1" class="align-center" hide-details>
<template v-slot:append>
<VTextField
width="5rem"