feat: 同步动作与首帧编辑能力并统一工作区反馈
接入动作时间轴、密度审计、人工视线目标和后台首帧编辑;独立读取已保存提示词,并在首帧晋升前重新核对持久化质量状态。 统一 NMessage 结果反馈、局部 loading 和业务说明间距,保留真实长任务进度与部分失败语义。 验证:pnpm check(49 个文件、393 项测试)、pnpm build;当前环境无法完成 localhost 浏览器验收及真实后端联调。
This commit is contained in:
1 parent
83482a70c5
commit
7a60db3ced
76 files changed
+2485
-457
No files matched your search
@@ -1,6 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { isOperationRunning } from '../workflows/operations'
|
||||
|
||||
import ContextNotice from '../../components/ui/ContextNotice.vue'
|
||||
|
||||
import WorkspacePage from '../../components/ui/WorkspacePage.vue'
|
||||
import { NAlert, NButton } from 'naive-ui'
|
||||
import { NButton } from 'naive-ui'
|
||||
import { LoaderCircle, LockKeyhole, LockKeyholeOpen, Palette, TriangleAlert } from '@lucide/vue'
|
||||
import { computed, ref } from 'vue'
|
||||
import { useQuery } from '../../composables/useQuery'
|
||||
@@ -139,6 +143,7 @@ function removeImage(image: VisualStyleImage) {
|
||||
</div>
|
||||
<div class="visual-style-actions toolbar-actions">
|
||||
<ConfirmAction
|
||||
:loading="isOperationRunning(operation, 'AI 生成项目视觉风格')"
|
||||
:label="style ? 'AI 重新生成风格' : 'AI 生成风格'"
|
||||
:disabled="disabled || !!style?.isLocked || dirty"
|
||||
acknowledgement
|
||||
@@ -149,18 +154,17 @@ function removeImage(image: VisualStyleImage) {
|
||||
</div>
|
||||
</template>
|
||||
<template #notice>
|
||||
<NAlert v-if="nextReady && style" type="success" :show-icon="false">
|
||||
视觉风格已准备好,可以继续确认人物、场景和道具的主体身份。
|
||||
<RouterLink :to="`/projects/${projectId}/subject-identity`" class="text-button ml-2"
|
||||
<div v-if="nextReady && style" class="flex justify-end text-xs">
|
||||
<RouterLink :to="`/projects/${projectId}/subject-identity`" class="text-button"
|
||||
>继续主体身份 →</RouterLink
|
||||
>
|
||||
</NAlert>
|
||||
</div>
|
||||
</template>
|
||||
<div class="workspace-section-stack">
|
||||
<NAlert v-if="query.error.value" role="alert" type="error" :show-icon="false"
|
||||
<ContextNotice v-if="query.error.value" role="alert" type="error" :show-icon="false"
|
||||
>{{ query.error.value }} 当前内容读取失败;已有内容不会被覆盖。
|
||||
<NButton text class="ml-3" :loading="query.loading.value" @click="query.refresh">重试读取</NButton>
|
||||
</NAlert>
|
||||
</ContextNotice>
|
||||
<p v-if="dirty" class="mb-4 text-xs text-muted">
|
||||
有未保存修改,AI 重生成暂不可用。刷新不会覆盖编辑内容;离开页面不会自动保存。
|
||||
</p>
|
||||
@@ -177,6 +181,7 @@ function removeImage(image: VisualStyleImage) {
|
||||
v-if="query.data.value"
|
||||
:key="editorRevision"
|
||||
:visual-style="style"
|
||||
:saving="isOperationRunning(operation, '保存项目视觉风格')"
|
||||
:disabled="disabled"
|
||||
@save="save"
|
||||
@dirty="dirty = $event"
|
||||
|
||||
@@ -7,7 +7,11 @@ import { computed, reactive, ref, watch } from 'vue'
|
||||
import type { SaveVisualStyleInput, VisualStyle } from '../types'
|
||||
|
||||
/** 编辑草稿独立于轮询结果,刷新不会覆盖尚未保存的输入。 */
|
||||
const props = defineProps<{ visualStyle: VisualStyle | null; disabled: boolean }>()
|
||||
const props = defineProps<{
|
||||
visualStyle: VisualStyle | null
|
||||
disabled: boolean
|
||||
/** 当前表单保存请求。 */ saving?: boolean
|
||||
}>()
|
||||
/** 保存校验后的风格配置,并向父页面同步草稿状态。 */
|
||||
const emit = defineEmits<{ save: [input: SaveVisualStyleInput]; dirty: [value: boolean] }>()
|
||||
/** 整体风格、分类补充和硬约束保持在同一份编辑草稿中。 */
|
||||
@@ -143,7 +147,9 @@ const rules = { constraints: stringArrayJsonRule }
|
||||
锁定后仍可人工编辑并保存。取消勾选并保存后,才能再次使用 AI 重生成。
|
||||
</p>
|
||||
<div class="page-form-actions">
|
||||
<NButton :disabled="disabled" type="primary" attr-type="submit"> 保存视觉风格 </NButton>
|
||||
<NButton :disabled="disabled" type="primary" attr-type="submit" :loading="saving">
|
||||
保存视觉风格
|
||||
</NButton>
|
||||
</div>
|
||||
</fieldset>
|
||||
</AppForm>
|
||||
|
||||
Reference in new issue
Block a user