auto-sync: 2026-05-19 13:43:02

This commit is contained in:
cfdaily
2026-05-19 13:43:03 +08:00
parent 089145b21e
commit da8757554c
+15 -1
View File
@@ -17,6 +17,7 @@ const PIPELINE_STEPS = [
const PIPELINE_ORDER: Record<string, number> = {
pending: 0, claimed: 1, working: 2, review: 3, done: 4,
paused: 2, escalated: 2, waiting_human: 2,
failed: 2, blocked: 2, cancelled: -1,
};
@@ -224,7 +225,20 @@ function TaskCard({ task, subtaskCount, subtaskDone, activeStage, onOpen }: {
);
}
// ── 空状态(无项目/无数据)──
// ── 卡片快捷按钮(每状态最多3个) ──
const CARD_ACTIONS: Record<string, Array<{ label: string; icon: string; action: string; color: string; bg: string; border: string }>> = {
pending: [{ label: '认领', icon: '👤', action: 'claimed', color: '#a07aff', bg: '#a07aff22', border: '#a07aff44' }, { label: '取消', icon: '🚫', action: 'cancelled', color: '#6b7280', bg: '#6b728022', border: '#6b728044' }],
claimed: [{ label: '开始', icon: '⚔️', action: 'working', color: '#2ecc8a', bg: '#2ecc8a22', border: '#2ecc8a44' }],
working: [{ label: '提审', icon: '🔍', action: 'review', color: '#818cf8', bg: '#818cf822', border: '#818cf844' }, { label: '暂停', icon: '⏸', action: 'paused', color: '#818cf8', bg: '#818cf822', border: '#818cf844' }],
paused: [{ label: '继续', icon: '▶', action: 'working', color: '#2ecc8a', bg: '#2ecc8a22', border: '#2ecc8a44' }],
review: [{ label: '通过', icon: '✅', action: 'approve', color: '#2ecc8a', bg: '#2ecc8a22', border: '#2ecc8a44' }],
escalated: [{ label: '继续', icon: '▶', action: 'working', color: '#2ecc8a', bg: '#2ecc8a22', border: '#2ecc8a44' }],
waiting_human: [{ label: '确认', icon: '✅', action: 'approve', color: '#2ecc8a', bg: '#2ecc8a22', border: '#2ecc8a44' }],
done: [{ label: '归档', icon: '📦', action: 'archive', color: '#6b7280', bg: '#6b728022', border: '#6b728044' }],
failed: [{ label: '重试', icon: '🔄', action: 'pending', color: '#7a9aff', bg: '#7a9aff22', border: '#7a9aff44' }],
blocked: [{ label: '解除', icon: '🔄', action: 'pending', color: '#7a9aff', bg: '#7a9aff22', border: '#7a9aff44' }],
cancelled: [{ label: '归档', icon: '📦', action: 'archive', color: '#6b7280', bg: '#6b728022', border: '#6b728044' }],
};
function EmptyState({ hasProject }: { hasProject: boolean }) {
return (
<div style={{ textAlign: 'center', padding: 60, color: 'var(--muted)' }}>