修复: 多视图UX(知识库窄屏CSS+任务详情路由+项目灵感视图)

This commit is contained in:
2026-06-16 02:33:16 +08:00
parent 10e4945e5a
commit 73ed4bd637
13 changed files with 70 additions and 194 deletions

View File

@@ -126,15 +126,13 @@ const stats = computed(() => [
])
function getProjectStage(status: string): { stage: string; stageLabelKey: string; progress: number } {
// stage(颜色档)与 stageLabelKey(文案)语义必须一致:
// planning/cancelled 不再借用 coding/testing 颜色(否则颜色撒谎),改用专属颜色档
// F-09 对齐:project status 死键(in_progress/paused/cancelled)已从后端映射移除,
// 此处 switch 同步收敛,与 constants/project.ts 的 PROJECT_STAGE_INFO 语义一致
switch (status) {
case 'planning': return { stage: 'planning', stageLabelKey: 'planning', progress: 20 }
case 'in_progress': return { stage: 'coding', stageLabelKey: 'coding', progress: 55 }
case 'paused': return { stage: 'testing', stageLabelKey: 'paused', progress: 40 }
case 'active': return { stage: 'coding', stageLabelKey: 'coding', progress: 55 }
case 'completed': return { stage: 'release', stageLabelKey: 'done', progress: 100 }
case 'cancelled': return { stage: 'cancelled', stageLabelKey: 'cancelled', progress: 0 }
default: return { stage: 'coding', stageLabelKey: 'coding', progress: 30 }
default: return { stage: 'planning', stageLabelKey: 'planning', progress: 20 }
}
}