mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 07:28:37 +08:00
style(SubscribeCard): support different styles for subscription states
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@ export interface Subscribe {
|
|||||||
lack_episode?: number
|
lack_episode?: number
|
||||||
// 附加信息
|
// 附加信息
|
||||||
note?: string
|
note?: string
|
||||||
// 状态:N-新建, R-订阅中
|
// 状态:N-新建 R-订阅中 P-待定 S-暂停
|
||||||
state: string
|
state: string
|
||||||
// 最后更新时间
|
// 最后更新时间
|
||||||
last_update: string
|
last_update: string
|
||||||
|
|||||||
@@ -38,6 +38,9 @@ const subscribeFilesDialog = ref(false)
|
|||||||
// 分享订阅弹窗
|
// 分享订阅弹窗
|
||||||
const subscribeShareDialog = ref(false)
|
const subscribeShareDialog = ref(false)
|
||||||
|
|
||||||
|
// 定义一个变量来保存当前的订阅状态
|
||||||
|
const subscribeState = ref<string>(props.media?.state ?? 'P')
|
||||||
|
|
||||||
// 上一次更新时间
|
// 上一次更新时间
|
||||||
const lastUpdateText = ref(props.media && props.media.last_update ? formatDateDifference(props.media.last_update) : '')
|
const lastUpdateText = ref(props.media && props.media.last_update ? formatDateDifference(props.media.last_update) : '')
|
||||||
|
|
||||||
@@ -242,6 +245,7 @@ function onSubscribeEditRemove() {
|
|||||||
:class="{
|
:class="{
|
||||||
'outline-dashed outline-1': props.media?.best_version && imageLoaded,
|
'outline-dashed outline-1': props.media?.best_version && imageLoaded,
|
||||||
'transition transform-cpu duration-300 scale-105 shadow-lg': hover.isHovering,
|
'transition transform-cpu duration-300 scale-105 shadow-lg': hover.isHovering,
|
||||||
|
'opacity-70': subscribeState === 'S',
|
||||||
}"
|
}"
|
||||||
min-height="170"
|
min-height="170"
|
||||||
@click="editSubscribeDialog"
|
@click="editSubscribeDialog"
|
||||||
@@ -277,6 +281,10 @@ function onSubscribeEditRemove() {
|
|||||||
</template>
|
</template>
|
||||||
<div class="absolute inset-0 subscribe-card-background"></div>
|
<div class="absolute inset-0 subscribe-card-background"></div>
|
||||||
</VImg>
|
</VImg>
|
||||||
|
<div
|
||||||
|
v-if="subscribeState === 'P'"
|
||||||
|
class="absolute inset-0 bg-yellow-900 opacity-40 pointer-events-none"
|
||||||
|
></div>
|
||||||
</template>
|
</template>
|
||||||
<div>
|
<div>
|
||||||
<VCardText class="flex items-center">
|
<VCardText class="flex items-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user