auto-sync: 2026-05-21 20:07:49

This commit is contained in:
cfdaily
2026-05-21 20:07:49 +08:00
parent 3fb9c34f07
commit b50dcedde1
+7 -14
View File
@@ -181,28 +181,21 @@ function StatusButtons({ status, taskId, onAction }: { status: string; taskId: s
}
};
const btn = (b: typeof primary[0]) => (
const btn = (b: typeof buttons[0]) => (
<button key={b.target} onClick={() => handleClick(b.target)} disabled={!!loading} style={{
padding: '5px 12px', borderRadius: 6, fontSize: 11, cursor: loading ? 'not-allowed' : 'pointer',
background: b.bg, color: b.color, border: `1px solid ${b.border}`, fontWeight: 600, opacity: loading === b.target ? 0.6 : 1,
}}>{loading === b.target ? '⏳' : b.icon} {b.label}</button>
);
if (buttons.length === 0) {
return <div style={{ fontSize: 12, color: 'var(--muted)', padding: '4px 0' }}>-</div>;
}
return (
<div>
<div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>{primary.map(b => btn(b))}</div>
{advanced.length > 0 && (
<div style={{ marginTop: 6 }}>
{!showAdvanced ? (
<button onClick={() => setShowAdvanced(true)} style={{ fontSize: 10, color: 'var(--muted)', background: 'none', border: 'none', cursor: 'pointer', padding: '2px 0' }}>
</button>
) : (
<div style={{ display: 'flex', gap: 6, flexWrap: 'wrap', padding: '4px 0', borderTop: '1px dashed var(--line)', marginTop: 4 }}>
{advanced.map(b => btn(b))}
<button onClick={() => setShowAdvanced(false)} style={{ fontSize: 10, color: 'var(--muted)', background: 'none', border: 'none', cursor: 'pointer' }}></button>
</div>
)}
<div style={{ display: 'flex', gap: 6, flexWrap: 'wrap' }}>{buttons.map(b => btn(b))}</div>
</div>
</div>
)}
</div>