接入动作时间轴、密度审计、人工视线目标和后台首帧编辑;独立读取已保存提示词,并在首帧晋升前重新核对持久化质量状态。 统一 NMessage 结果反馈、局部 loading 和业务说明间距,保留真实长任务进度与部分失败语义。 验证:pnpm check(49 个文件、393 项测试)、pnpm build;当前环境无法完成 localhost 浏览器验收及真实后端联调。
29 lines
1.2 KiB
Vue
29 lines
1.2 KiB
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { NTag } from 'naive-ui'
|
|
import { LoaderCircle } from '@lucide/vue'
|
|
import { statusLabels } from '../../lib/format'
|
|
import type { ProjectStatus } from '../../features/projects/types'
|
|
/** 状态使用 Naive 标签,同时保留文本,避免仅依赖颜色区分。 */
|
|
const props = defineProps<{ status: string; label?: string }>()
|
|
/** 仅真实执行状态显示旋转图标,锁定或待确认状态不冒充加载。 */
|
|
const running = computed(() =>
|
|
['running', 'generating', 'pending', 'queued', 'processing', 'submitted'].includes(props.status)
|
|
)
|
|
const type = computed(() =>
|
|
['failed', 'blocked', 'cancelled'].includes(props.status)
|
|
? 'error'
|
|
: ['completed', 'ready'].includes(props.status)
|
|
? 'success'
|
|
: ['running', 'generating', 'pending', 'unlocked', 'candidate_pending'].includes(props.status)
|
|
? 'warning'
|
|
: 'default'
|
|
)
|
|
</script>
|
|
<template>
|
|
<NTag :type="type" size="small" :bordered="false" :data-status="status" :aria-busy="running"
|
|
><template v-if="running" #icon><LoaderCircle :size="12" class="animate-spin" /></template
|
|
>{{ label || statusLabels[status as ProjectStatus] || status }}</NTag
|
|
>
|
|
</template>
|