feat: 剧本拆解完成后开放视觉制作入口
This commit is contained in:
1 parent
ad95ffaf0b
commit
c804d849b9
1 file changed
+5
-3
@@ -23,7 +23,7 @@ import { errorMessage } from '../../lib/http'
|
||||
import { downloadText, nodeLabel } from '../../lib/format'
|
||||
|
||||
/** 拆解工作区:先预览真实分组,再启动;恢复操作根据 checkpoint 分阶段展示。 */
|
||||
const { project, checkpoints, refresh, error } = useProjectContext()
|
||||
const { project, checkpoints, refresh, refreshStageReadiness, stageReadiness, error } = useProjectContext()
|
||||
const groupSize = ref(3)
|
||||
const modules = ref<BreakdownModule[]>(['character', 'scene', 'prop'])
|
||||
const preview = ref<BreakdownPreview | null>(null)
|
||||
@@ -56,7 +56,8 @@ const taskStopped = computed(() => execution.value?.status === 'failed' || execu
|
||||
watch(
|
||||
() => backgroundExecution.query.data.value?.status,
|
||||
(status, previous) => {
|
||||
if ((status === 'completed' || status === 'failed') && status !== previous) void refresh()
|
||||
if ((status === 'completed' || status === 'failed') && status !== previous)
|
||||
void Promise.all([refresh(), refreshStageReadiness()])
|
||||
}
|
||||
)
|
||||
const showRecovery = computed(
|
||||
@@ -66,6 +67,7 @@ const configValid = computed(
|
||||
() => Number.isSafeInteger(groupSize.value) && groupSize.value > 0 && modules.value.length > 0
|
||||
)
|
||||
const input = computed<BreakdownInput>(() => ({ groupSize: groupSize.value, modules: [...modules.value] }))
|
||||
const stageComplete = computed(() => stageReadiness.value?.breakdown.ready === true)
|
||||
const canStart = computed(
|
||||
() =>
|
||||
!!project.value?.episodes.length &&
|
||||
@@ -157,7 +159,7 @@ const rules = {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<WorkspacePage split compact class="breakdown-workspace-page">
|
||||
<NAlert v-if="stageComplete" type="success" :show-icon="false" class="mb-3">\n 剧本拆解已经准备完成,人物、场景、道具和正式镜头都可以进入后续制作。\n <RouterLink :to="`/projects/${projectId}/visual-style`" class="text-button ml-2">继续视觉风格 →</RouterLink>\n </NAlert>\n <WorkspacePage split compact class="breakdown-workspace-page">
|
||||
<template #header>
|
||||
<!-- 以下是拆解状态与设置 -->
|
||||
<div class="workspace-toolbar">
|
||||
|
||||
Reference in new issue
Block a user