auto-sync: 2026-05-19 13:45:23
This commit is contained in:
@@ -8,26 +8,32 @@ import { api } from '../api';
|
||||
|
||||
// ── 常量 ──
|
||||
const STATUS_META: Record<string, { color: string; label: string }> = {
|
||||
pending: { color: '#7a9aff', label: '待认领' },
|
||||
claimed: { color: '#a07aff', label: '已认领' },
|
||||
working: { color: '#6a9eff', label: '执行中' },
|
||||
review: { color: '#818cf8', label: '审查中' },
|
||||
done: { color: '#2ecc8a', label: '已完成' },
|
||||
failed: { color: '#ff5270', label: '失败' },
|
||||
blocked: { color: '#f59e0b', label: '阻塞' },
|
||||
cancelled: { color: '#6b7280', label: '已取消' },
|
||||
pending: { color: '#7a9aff', label: '待认领' },
|
||||
claimed: { color: '#a07aff', label: '已认领' },
|
||||
working: { color: '#6a9eff', label: '执行中' },
|
||||
review: { color: '#818cf8', label: '审查中' },
|
||||
paused: { color: '#818cf8', label: '已暂停' },
|
||||
escalated: { color: '#ff5270', label: '已升级' },
|
||||
waiting_human: { color: '#f59e0b', label: '等人工' },
|
||||
done: { color: '#2ecc8a', label: '已完成' },
|
||||
failed: { color: '#ff5270', label: '失败' },
|
||||
blocked: { color: '#f59e0b', label: '阻塞' },
|
||||
cancelled: { color: '#6b7280', label: '已取消' },
|
||||
};
|
||||
|
||||
// 对齐后端 VALID_TRANSITIONS
|
||||
// v2.8: 对齐设计文档的 Modal 完整按钮
|
||||
const VALID_TRANSITIONS: Record<string, string[]> = {
|
||||
pending: ['claimed', 'cancelled'],
|
||||
claimed: ['working', 'pending', 'cancelled'],
|
||||
working: ['review', 'blocked', 'failed', 'cancelled'],
|
||||
review: ['done', 'pending', 'failed', 'cancelled'],
|
||||
blocked: ['pending', 'cancelled'],
|
||||
failed: ['pending'],
|
||||
done: [],
|
||||
cancelled: [],
|
||||
pending: ['claimed', 'cancelled'],
|
||||
claimed: ['working', 'paused', 'cancelled'],
|
||||
working: ['review', 'paused', 'escalated', 'cancelled'],
|
||||
review: ['done', 'pending', 'failed', 'escalated'],
|
||||
paused: ['working', 'cancelled'],
|
||||
escalated: ['working', 'pending', 'cancelled'],
|
||||
waiting_human: ['done', 'pending'],
|
||||
done: [],
|
||||
failed: ['pending', 'escalated', 'cancelled'],
|
||||
blocked: ['pending', 'escalated', 'cancelled'],
|
||||
cancelled: [],
|
||||
};
|
||||
|
||||
const PRIORITY_META: Record<number, { color: string; label: string }> = {
|
||||
|
||||
Reference in New Issue
Block a user