feat: 生产页提示并处理过期主首帧
This commit is contained in:
@@ -66,6 +66,7 @@ const canGenerateVideo = computed(
|
|||||||
() =>
|
() =>
|
||||||
!assetBlocked.value && !activeVideo.value && !!props.videoReadiness && props.videoReadiness.issues.length === 0
|
!assetBlocked.value && !activeVideo.value && !!props.videoReadiness && props.videoReadiness.issues.length === 0
|
||||||
)
|
)
|
||||||
|
const keyframeStale = computed(() => !!props.keyframeReadiness?.primaryKeyframeStale)
|
||||||
|
|
||||||
watch(key, () => {
|
watch(key, () => {
|
||||||
confirmingKeyframe.value = ''
|
confirmingKeyframe.value = ''
|
||||||
@@ -241,9 +242,12 @@ async function inspectSpecs() {
|
|||||||
<StatusBadge
|
<StatusBadge
|
||||||
v-if="keyframeReadiness"
|
v-if="keyframeReadiness"
|
||||||
:status="keyframeReadiness.status"
|
:status="keyframeReadiness.status"
|
||||||
:label="productionStatusLabel(keyframeReadiness.status)"
|
:label="keyframeStale ? '主首帧已过期' : productionStatusLabel(keyframeReadiness.status)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<p v-if="keyframeStale" class="alert mt-3 text-xs" role="status">
|
||||||
|
当前主首帧使用的主体参考资产已经变化,旧图仍保留但不会继续进入视频生成。请重新生成主首帧。
|
||||||
|
</p>
|
||||||
<ul v-if="keyframeReadiness?.issues.length" class="mt-3 space-y-2 text-xs text-danger">
|
<ul v-if="keyframeReadiness?.issues.length" class="mt-3 space-y-2 text-xs text-danger">
|
||||||
<li v-for="issue in keyframeReadiness.issues" :key="issue.code">
|
<li v-for="issue in keyframeReadiness.issues" :key="issue.code">
|
||||||
{{ issueLabel(issue.code) }}:{{ issue.reason }}
|
{{ issueLabel(issue.code) }}:{{ issue.reason }}
|
||||||
@@ -260,6 +264,7 @@ async function inspectSpecs() {
|
|||||||
<div class="flex flex-wrap items-center gap-2">
|
<div class="flex flex-wrap items-center gap-2">
|
||||||
<StatusBadge :status="item.status" :label="productionStatusLabel(item.status)" />
|
<StatusBadge :status="item.status" :label="productionStatusLabel(item.status)" />
|
||||||
<span v-if="item.isPrimary" class="tag">主首帧</span>
|
<span v-if="item.isPrimary" class="tag">主首帧</span>
|
||||||
|
<span v-if="item.isPrimary && keyframeStale" class="tag">已过期</span>
|
||||||
<span class="text-[10px] text-muted"
|
<span class="text-[10px] text-muted"
|
||||||
>{{ item.width || '—' }} × {{ item.height || '—' }}</span
|
>{{ item.width || '—' }} × {{ item.height || '—' }}</span
|
||||||
>
|
>
|
||||||
@@ -286,7 +291,7 @@ async function inspectSpecs() {
|
|||||||
</div>
|
</div>
|
||||||
<p v-else class="mt-4 text-xs text-muted">尚无首帧记录。</p>
|
<p v-else class="mt-4 text-xs text-muted">尚无首帧记录。</p>
|
||||||
<button class="button button-secondary mt-4" :disabled="!canGenerateKeyframe" @click="keyframeOpen = true">
|
<button class="button button-secondary mt-4" :disabled="!canGenerateKeyframe" @click="keyframeOpen = true">
|
||||||
<ImagePlus :size="14" />{{ currentKeyframe ? '再生成一张候选' : '生成首帧' }}
|
<ImagePlus :size="14" />{{ keyframeStale ? '重新生成主首帧' : currentKeyframe ? '再生成一张候选' : '生成首帧' }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -415,6 +420,7 @@ async function inspectSpecs() {
|
|||||||
:shot-id="shot.shotId"
|
:shot-id="shot.shotId"
|
||||||
:shot-title="shot.title"
|
:shot-title="shot.title"
|
||||||
:keyframes="keyframes"
|
:keyframes="keyframes"
|
||||||
|
:replace-primary="keyframeStale"
|
||||||
:disabled="!canGenerateKeyframe"
|
:disabled="!canGenerateKeyframe"
|
||||||
@generate="generateKeyframe"
|
@generate="generateKeyframe"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user