mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-08 17:26:41 +08:00
fix: bind subscribe status tooltip to full state
This commit is contained in:
@@ -726,7 +726,14 @@ function handleCardClick() {
|
||||
<div class="subscribe-card-mobile-body">
|
||||
<div class="subscribe-card-mobile-footer">
|
||||
<div class="subscribe-card-mobile-meta">
|
||||
<VTooltip
|
||||
:text="executionStateDisplay?.error"
|
||||
:disabled="!executionStateDisplay?.error"
|
||||
location="top"
|
||||
>
|
||||
<template #activator="{ props: tooltipProps }">
|
||||
<div
|
||||
v-bind="tooltipProps"
|
||||
class="subscribe-card-mobile-state"
|
||||
:style="{ color: `rgb(var(--v-theme-${compactStateDisplay.color}))` }"
|
||||
:title="executionStateDisplay?.error || compactStateDisplay.label"
|
||||
@@ -740,10 +747,9 @@ function handleCardClick() {
|
||||
<span v-if="compactStateText" class="subscribe-card-mobile-progress-text">
|
||||
{{ compactStateText }}
|
||||
</span>
|
||||
<VTooltip v-if="executionStateDisplay?.error" activator="parent" location="top">
|
||||
{{ executionStateDisplay.error }}
|
||||
</VTooltip>
|
||||
</div>
|
||||
</template>
|
||||
</VTooltip>
|
||||
|
||||
<IconBtn v-if="!props.sortable" class="subscribe-card-mobile-menu" size="small" @click.stop>
|
||||
<VIcon icon="mdi-dots-horizontal" size="18" />
|
||||
@@ -862,20 +868,28 @@ function handleCardClick() {
|
||||
</div>
|
||||
</VCardText>
|
||||
<!-- 右下角元数据:暂停 / 待定时替换"x 天前"为状态文案 -->
|
||||
<VCardText
|
||||
<VTooltip
|
||||
v-if="rightBottomStateDisplay"
|
||||
:text="executionStateDisplay?.error"
|
||||
:disabled="!executionStateDisplay?.error"
|
||||
location="top"
|
||||
>
|
||||
<template #activator="{ props: tooltipProps }">
|
||||
<VCardText
|
||||
v-bind="tooltipProps"
|
||||
class="absolute right-0 bottom-0 d-flex align-center p-2 text-gray-300 text-xs"
|
||||
:style="
|
||||
executionStateDisplay ? { color: `rgb(var(--v-theme-${executionStateDisplay.color}))` } : undefined
|
||||
executionStateDisplay
|
||||
? { color: `rgb(var(--v-theme-${executionStateDisplay.color}))` }
|
||||
: undefined
|
||||
"
|
||||
:title="executionStateDisplay?.error || rightBottomStateDisplay.label"
|
||||
>
|
||||
<VIcon :icon="rightBottomStateDisplay.icon" class="me-1" />
|
||||
{{ rightBottomStateDisplay.label }}
|
||||
<VTooltip v-if="executionStateDisplay?.error" activator="parent" location="top">
|
||||
{{ executionStateDisplay.error }}
|
||||
</VTooltip>
|
||||
</VCardText>
|
||||
</template>
|
||||
</VTooltip>
|
||||
<VCardText
|
||||
v-else-if="lastUpdateText"
|
||||
class="absolute right-0 bottom-0 d-flex align-center p-2 text-gray-300 text-xs"
|
||||
|
||||
@@ -364,7 +364,10 @@ describe('SubscribeCard display and progress', () => {
|
||||
})
|
||||
|
||||
expect(screen.getByText('等待站点额度')).toBeInTheDocument()
|
||||
expect(screen.getByTitle('站点 9 冷却中')).toBeInTheDocument()
|
||||
const status = screen.getByTitle('站点 9 冷却中')
|
||||
expect(status).toBeInTheDocument()
|
||||
await fireEvent.mouseEnter(status)
|
||||
await waitFor(() => expect(screen.getByRole('tooltip')).toHaveTextContent('站点 9 冷却中'))
|
||||
})
|
||||
|
||||
it.each([480, 1024])('shows a skipped execution as a non-error terminal state at %ipx', async width => {
|
||||
|
||||
Reference in New Issue
Block a user