mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 00:36:41 +08:00
fix mediainfocard
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import type { Context } from '@/api/types'
|
import type { Context } from '@/api/types'
|
||||||
|
import { isNullOrEmptyObject } from '@/@core/utils'
|
||||||
|
|
||||||
// 输入参数
|
// 输入参数
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -9,15 +10,13 @@ const props = defineProps({
|
|||||||
|
|
||||||
// TMDB图片转换为w500大小
|
// TMDB图片转换为w500大小
|
||||||
function getW500Image(url = '') {
|
function getW500Image(url = '') {
|
||||||
if (!url)
|
if (!url) return ''
|
||||||
return ''
|
|
||||||
return url.replace('original', 'w500')
|
return url.replace('original', 'w500')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开TMDB详情页面
|
// 打开TMDB详情页面
|
||||||
function openTmdbPage(type: string, tmdbId: number) {
|
function openTmdbPage(type: string, tmdbId: number) {
|
||||||
if (!type || !tmdbId)
|
if (!type || !tmdbId) return
|
||||||
return
|
|
||||||
|
|
||||||
const url = `https://www.themoviedb.org/${type === '电影' ? 'movie' : 'tv'}/${tmdbId}`
|
const url = `https://www.themoviedb.org/${type === '电影' ? 'movie' : 'tv'}/${tmdbId}`
|
||||||
window.open(url, '_blank')
|
window.open(url, '_blank')
|
||||||
@@ -31,10 +30,7 @@ function openTmdbPage(type: string, tmdbId: number) {
|
|||||||
v-if="context?.meta_info?.name"
|
v-if="context?.meta_info?.name"
|
||||||
class="d-flex justify-space-between flex-wrap flex-md-nowrap flex-column flex-md-row"
|
class="d-flex justify-space-between flex-wrap flex-md-nowrap flex-column flex-md-row"
|
||||||
>
|
>
|
||||||
<div
|
<div v-if="context?.media_info?.poster_path" class="ma-auto">
|
||||||
v-if="context?.media_info?.poster_path"
|
|
||||||
class="ma-auto"
|
|
||||||
>
|
|
||||||
<VImg
|
<VImg
|
||||||
width="10rem"
|
width="10rem"
|
||||||
aspect-ratio="2/3"
|
aspect-ratio="2/3"
|
||||||
@@ -75,16 +71,10 @@ function openTmdbPage(type: string, tmdbId: number) {
|
|||||||
variant="elevated"
|
variant="elevated"
|
||||||
class="me-1 mb-1 text-white bg-blue-500"
|
class="me-1 mb-1 text-white bg-blue-500"
|
||||||
>
|
>
|
||||||
{{
|
{{ context?.media_info?.type || context?.meta_info?.type }}
|
||||||
context?.media_info?.type || context?.meta_info?.type
|
|
||||||
}}
|
|
||||||
</VChip>
|
</VChip>
|
||||||
<!-- 二级分类 -->
|
<!-- 二级分类 -->
|
||||||
<VChip
|
<VChip v-if="context?.media_info?.category" variant="elevated" class="me-1 mb-1 text-white bg-blue-500">
|
||||||
v-if="context?.media_info?.category"
|
|
||||||
variant="elevated"
|
|
||||||
class="me-1 mb-1 text-white bg-blue-500"
|
|
||||||
>
|
|
||||||
{{ context?.media_info?.category }}
|
{{ context?.media_info?.category }}
|
||||||
</VChip>
|
</VChip>
|
||||||
<!-- TMDBID -->
|
<!-- TMDBID -->
|
||||||
@@ -98,18 +88,10 @@ function openTmdbPage(type: string, tmdbId: number) {
|
|||||||
{{ context?.media_info?.tmdb_id }}
|
{{ context?.media_info?.tmdb_id }}
|
||||||
</VChip>
|
</VChip>
|
||||||
<!-- meta_info -->
|
<!-- meta_info -->
|
||||||
<VChip
|
<VChip v-if="context?.meta_info?.edition" variant="elevated" class="me-1 mb-1 text-white bg-red-500">
|
||||||
v-if="context?.meta_info?.edition"
|
|
||||||
variant="elevated"
|
|
||||||
class="me-1 mb-1 text-white bg-red-500"
|
|
||||||
>
|
|
||||||
{{ context?.meta_info?.edition }}
|
{{ context?.meta_info?.edition }}
|
||||||
</VChip>
|
</VChip>
|
||||||
<VChip
|
<VChip v-if="context?.meta_info?.resource_pix" variant="elevated" class="me-1 mb-1 text-white bg-red-500">
|
||||||
v-if="context?.meta_info?.resource_pix"
|
|
||||||
variant="elevated"
|
|
||||||
class="me-1 mb-1 text-white bg-red-500"
|
|
||||||
>
|
|
||||||
{{ context?.meta_info?.resource_pix }}
|
{{ context?.meta_info?.resource_pix }}
|
||||||
</VChip>
|
</VChip>
|
||||||
<VChip
|
<VChip
|
||||||
@@ -126,36 +108,19 @@ function openTmdbPage(type: string, tmdbId: number) {
|
|||||||
>
|
>
|
||||||
{{ context?.meta_info?.audio_encode }}
|
{{ context?.meta_info?.audio_encode }}
|
||||||
</VChip>
|
</VChip>
|
||||||
<VChip
|
<VChip v-if="context?.meta_info?.resource_team" variant="elevated" class="me-1 mb-1 text-white bg-cyan-500">
|
||||||
v-if="context?.meta_info?.resource_team"
|
|
||||||
variant="elevated"
|
|
||||||
class="me-1 mb-1 text-white bg-cyan-500"
|
|
||||||
>
|
|
||||||
{{ context?.meta_info?.resource_team }}
|
{{ context?.meta_info?.resource_team }}
|
||||||
</VChip>
|
</VChip>
|
||||||
</VCardItem>
|
</VCardItem>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<VAlert
|
<VAlert v-if="!context?.meta_info?.name" icon="mdi-alert-circle-outline"> 识别失败,无法识别到有效信息! </VAlert>
|
||||||
v-if="!context?.meta_info?.name"
|
|
||||||
icon="mdi-alert-circle-outline"
|
|
||||||
>
|
|
||||||
识别失败,无法识别到有效信息!
|
|
||||||
</VAlert>
|
|
||||||
</VCol>
|
</VCol>
|
||||||
<VExpansionPanels
|
<VExpansionPanels v-show="!isNullOrEmptyObject(context?.meta_info.apply_words)">
|
||||||
v-show="context?.meta_info?.title !== context?.meta_info.org_string"
|
|
||||||
>
|
|
||||||
<VExpansionPanel>
|
<VExpansionPanel>
|
||||||
<VExpansionPanelTitle>
|
<VExpansionPanelTitle> 识别词应用详情 </VExpansionPanelTitle>
|
||||||
识别词应用详情
|
|
||||||
</VExpansionPanelTitle>
|
|
||||||
<VExpansionPanelText>
|
<VExpansionPanelText>
|
||||||
<VChip
|
<VChip variant="elevated" class="me-1 mb-1 break-all" color="primary">
|
||||||
variant="elevated"
|
|
||||||
class="me-1 mb-1 break-all"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
{{ context?.meta_info.org_string }}
|
{{ context?.meta_info.org_string }}
|
||||||
</VChip>
|
</VChip>
|
||||||
<VChip
|
<VChip
|
||||||
|
|||||||
Reference in New Issue
Block a user