mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 08:46:40 +08:00
fix(subscribe): show best version mode tag (#471)
This commit is contained in:
@@ -67,6 +67,25 @@ const subscribeState = ref<string>(props.media?.state ?? 'P')
|
|||||||
// 上一次更新时间
|
// 上一次更新时间
|
||||||
const lastUpdateText = computed(() => (props.media?.last_update ? formatDateDifference(props.media.last_update) : ''))
|
const lastUpdateText = computed(() => (props.media?.last_update ? formatDateDifference(props.media.last_update) : ''))
|
||||||
|
|
||||||
|
// 判断后端数字/布尔开关是否启用
|
||||||
|
function isEnabledFlag(value: any) {
|
||||||
|
return value === true || value === 1 || value === '1'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 订阅列表接口通常返回中文媒体类型,插件或缓存数据可能只保留剧集字段
|
||||||
|
function isTvSubscribe(media?: Subscribe) {
|
||||||
|
return media?.type === '电视剧' || media?.type === 'tv' || !!media?.season || !!media?.total_episode
|
||||||
|
}
|
||||||
|
|
||||||
|
// TV 洗版订阅在卡片上展示分集或全集短标签
|
||||||
|
const bestVersionModeLabel = computed(() => {
|
||||||
|
if (!isEnabledFlag(props.media?.best_version) || !isTvSubscribe(props.media)) return ''
|
||||||
|
|
||||||
|
return isEnabledFlag(props.media?.best_version_full)
|
||||||
|
? t('subscribe.bestVersionWholeShort')
|
||||||
|
: t('subscribe.bestVersionEpisodeShort')
|
||||||
|
})
|
||||||
|
|
||||||
// 图片加载完成响应
|
// 图片加载完成响应
|
||||||
function imageLoadHandler() {
|
function imageLoadHandler() {
|
||||||
imageLoaded.value = true
|
imageLoaded.value = true
|
||||||
@@ -428,6 +447,15 @@ function handleCardClick() {
|
|||||||
{{ (props.media?.total_episode || 0) - (props.media?.lack_episode || 0) }} /
|
{{ (props.media?.total_episode || 0) - (props.media?.lack_episode || 0) }} /
|
||||||
{{ props.media?.total_episode }}
|
{{ props.media?.total_episode }}
|
||||||
</div>
|
</div>
|
||||||
|
<VChip
|
||||||
|
v-if="bestVersionModeLabel"
|
||||||
|
size="x-small"
|
||||||
|
color="primary"
|
||||||
|
variant="flat"
|
||||||
|
class="me-2 flex-shrink-0"
|
||||||
|
>
|
||||||
|
{{ bestVersionModeLabel }}
|
||||||
|
</VChip>
|
||||||
<VIcon v-if="props.media?.username && props.sortable" icon="mdi-account" size="small" color="white" class="flex-shrink-0 me-1" />
|
<VIcon v-if="props.media?.username && props.sortable" icon="mdi-account" size="small" color="white" class="flex-shrink-0 me-1" />
|
||||||
<IconBtn v-else-if="props.media?.username" icon="mdi-account" size="small" color="white" class="flex-shrink-0" />
|
<IconBtn v-else-if="props.media?.username" icon="mdi-account" size="small" color="white" class="flex-shrink-0" />
|
||||||
<!-- 用户名过长时限制在卡片宽度内,并用省略号展示剩余内容 -->
|
<!-- 用户名过长时限制在卡片宽度内,并用省略号展示剩余内容 -->
|
||||||
|
|||||||
@@ -984,6 +984,8 @@ export default {
|
|||||||
ranking: 'Ranking',
|
ranking: 'Ranking',
|
||||||
noStatisticsData: 'No share statistics data available',
|
noStatisticsData: 'No share statistics data available',
|
||||||
bestVersion: 'Version Upgrading',
|
bestVersion: 'Version Upgrading',
|
||||||
|
bestVersionEpisodeShort: 'Episode',
|
||||||
|
bestVersionWholeShort: 'Full',
|
||||||
completed: 'Completed',
|
completed: 'Completed',
|
||||||
subscribing: 'Subscribing',
|
subscribing: 'Subscribing',
|
||||||
notStarted: 'Not Started',
|
notStarted: 'Not Started',
|
||||||
|
|||||||
@@ -978,6 +978,8 @@ export default {
|
|||||||
ranking: '排名',
|
ranking: '排名',
|
||||||
noStatisticsData: '暂无分享统计数据',
|
noStatisticsData: '暂无分享统计数据',
|
||||||
bestVersion: '洗版中',
|
bestVersion: '洗版中',
|
||||||
|
bestVersionEpisodeShort: '分集',
|
||||||
|
bestVersionWholeShort: '全集',
|
||||||
completed: '订阅完成',
|
completed: '订阅完成',
|
||||||
subscribing: '订阅中',
|
subscribing: '订阅中',
|
||||||
notStarted: '未开始',
|
notStarted: '未开始',
|
||||||
@@ -2546,7 +2548,7 @@ export default {
|
|||||||
bestVersionFull: '全集洗版',
|
bestVersionFull: '全集洗版',
|
||||||
bestVersionFullHint: '只下载覆盖全集的整包资源,不按单集拆包下载',
|
bestVersionFullHint: '只下载覆盖全集的整包资源,不按单集拆包下载',
|
||||||
searchImdbid: '使用 ImdbID 搜索',
|
searchImdbid: '使用 ImdbID 搜索',
|
||||||
searchImdbidHint: '开使用 ImdbID 精确搜索资源',
|
searchImdbidHint: '开启后使用 ImdbID 精确搜索资源',
|
||||||
showEditDialog: '订阅时编辑更多规则',
|
showEditDialog: '订阅时编辑更多规则',
|
||||||
showEditDialogHint: '添加订阅时显示此编辑订阅对话框',
|
showEditDialogHint: '添加订阅时显示此编辑订阅对话框',
|
||||||
include: '包含(关键字、正则式)',
|
include: '包含(关键字、正则式)',
|
||||||
|
|||||||
@@ -979,6 +979,8 @@ export default {
|
|||||||
ranking: '排名',
|
ranking: '排名',
|
||||||
noStatisticsData: '暫無分享統計數據',
|
noStatisticsData: '暫無分享統計數據',
|
||||||
bestVersion: '洗版中',
|
bestVersion: '洗版中',
|
||||||
|
bestVersionEpisodeShort: '分集',
|
||||||
|
bestVersionWholeShort: '全集',
|
||||||
completed: '訂閱完成',
|
completed: '訂閱完成',
|
||||||
subscribing: '訂閱中',
|
subscribing: '訂閱中',
|
||||||
notStarted: '未開始',
|
notStarted: '未開始',
|
||||||
|
|||||||
Reference in New Issue
Block a user