mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-07-12 16:01:35 +08:00
订阅卡片增加剧集详情跳转功能
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
<script lang="ts" setup>
|
<script lang='ts' setup>
|
||||||
import { useToast } from 'vue-toast-notification'
|
import { useToast } from 'vue-toast-notification'
|
||||||
import SubscribeEditForm from '../form/SubscribeEditForm.vue'
|
import SubscribeEditForm from '../form/SubscribeEditForm.vue'
|
||||||
import { calculateTimeDifference } from '@/@core/utils'
|
import { calculateTimeDifference } from '@/@core/utils'
|
||||||
import { formatSeason } from '@/@core/utils/formatters'
|
import { formatSeason } from '@/@core/utils/formatters'
|
||||||
import api from '@/api'
|
import api from '@/api'
|
||||||
import type { Subscribe } from '@/api/types'
|
import type { Subscribe } from '@/api/types'
|
||||||
|
import router from '@/router'
|
||||||
|
|
||||||
// 输入参数
|
// 输入参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -55,7 +56,7 @@ function getPercentage() {
|
|||||||
return Math.round(
|
return Math.round(
|
||||||
(((props.media?.total_episode ?? 0) - (props.media?.lack_episode ?? 0))
|
(((props.media?.total_episode ?? 0) - (props.media?.lack_episode ?? 0))
|
||||||
/ (props.media?.total_episode ?? 1))
|
/ (props.media?.total_episode ?? 1))
|
||||||
* 100,
|
* 100,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,8 +127,28 @@ const dropdownItems = ref([
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '取消订阅',
|
title: '查看详情',
|
||||||
value: 3,
|
value: 3,
|
||||||
|
props: {
|
||||||
|
prependIcon: 'mdi-open-in-new',
|
||||||
|
click: () => {
|
||||||
|
router.push({
|
||||||
|
path: '/media',
|
||||||
|
query: {
|
||||||
|
mediaid: `${
|
||||||
|
props.media?.tmdbid
|
||||||
|
? `tmdb:${props.media?.tmdbid}`
|
||||||
|
: `douban:${props.media?.doubanid}`
|
||||||
|
}`,
|
||||||
|
type: props.media?.type,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '取消订阅',
|
||||||
|
value: 4,
|
||||||
props: {
|
props: {
|
||||||
prependIcon: 'mdi-trash-can-outline',
|
prependIcon: 'mdi-trash-can-outline',
|
||||||
color: 'error',
|
color: 'error',
|
||||||
@@ -162,7 +183,7 @@ const dropdownItems = ref([
|
|||||||
</template>
|
</template>
|
||||||
<VCardTitle :class="getTextClass()">
|
<VCardTitle :class="getTextClass()">
|
||||||
{{ props.media?.name }}
|
{{ props.media?.name }}
|
||||||
{{ formatSeason(props.media?.season ? props.media?.season.toString() : "") }}
|
{{ formatSeason(props.media?.season ? props.media?.season.toString() : '') }}
|
||||||
</VCardTitle>
|
</VCardTitle>
|
||||||
<template #append>
|
<template #append>
|
||||||
<div class="me-n3">
|
<div class="me-n3">
|
||||||
@@ -252,7 +273,8 @@ const dropdownItems = ref([
|
|||||||
<VIcon
|
<VIcon
|
||||||
icon="mdi-download"
|
icon="mdi-download"
|
||||||
class="me-1"
|
class="me-1"
|
||||||
/> {{ lastUpdateText }}
|
/>
|
||||||
|
{{ lastUpdateText }}
|
||||||
</VCardText>
|
</VCardText>
|
||||||
<VProgressLinear
|
<VProgressLinear
|
||||||
v-if="getPercentage() > 0"
|
v-if="getPercentage() > 0"
|
||||||
|
|||||||
Reference in New Issue
Block a user