feat: 任务列表去掉状态列, 新增更新时间列
- 移除「已启用/未启用」状态列及全部 status-dot/task-status 样式 - 新增「更新时间」列, 显示任务最近修改时间(History 图标) - 表格栅格 5 列重排, 清理 1250px 媒体查询对应覆盖
This commit is contained in:
parent
03e3d31a83
commit
541908961b
@ -5,6 +5,7 @@ import {
|
||||
CircleAlert,
|
||||
CirclePlay,
|
||||
Clock3,
|
||||
History,
|
||||
ListChecks,
|
||||
Pencil,
|
||||
Plus,
|
||||
@ -127,9 +128,9 @@ export function TasksPage({ flows, onCreate, onCreateExamples, onOpenEditor, onR
|
||||
|
||||
<div className="task-table-head" aria-hidden="true">
|
||||
<span>任务</span>
|
||||
<span>状态</span>
|
||||
<span>触发方式</span>
|
||||
<span>最近运行</span>
|
||||
<span>更新时间</span>
|
||||
<span />
|
||||
</div>
|
||||
|
||||
@ -149,14 +150,15 @@ export function TasksPage({ flows, onCreate, onCreateExamples, onOpenEditor, onR
|
||||
<span className="task-icon"><ListChecks className="icon" /></span>
|
||||
<span className="task-copy"><strong>{flow.name}</strong><small>{flow.nodeCount} 个节点</small></span>
|
||||
</div>
|
||||
<span className={`task-status ${flow.enabled === false ? "paused" : "enabled"}`}>
|
||||
<span className="status-dot" />{flow.enabled === false ? "未启用" : "已启用"}
|
||||
</span>
|
||||
<span className="task-trigger"><CalendarClock className="icon" />{flow.triggerLabel || "手动运行"}</span>
|
||||
<span className={`task-updated run-result ${flow.lastRunStatus || "never"}`} title={flow.lastRunError || ""}>
|
||||
<Clock3 className="icon" />
|
||||
<span>{flow.lastRunAt ? formatTime(flow.lastRunAt) : "尚未运行"}{flow.lastRunDurationMs !== undefined ? ` · ${formatDuration(flow.lastRunDurationMs)}` : ""}</span>
|
||||
</span>
|
||||
<span className="task-updated" title={`最近修改于 ${formatTime(flow.updatedAt)}`}>
|
||||
<History className="icon" />
|
||||
<span>{formatTime(flow.updatedAt)}</span>
|
||||
</span>
|
||||
<span className="task-row-actions">
|
||||
<button type="button" className="icon-btn" title="运行任务" onClick={(event) => { event.stopPropagation(); onRun(flow.id); }}>
|
||||
<CirclePlay className="icon" />
|
||||
|
||||
@ -538,14 +538,6 @@ textarea:focus-visible {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: var(--success);
|
||||
box-shadow: 0 0 0 3px rgba(7, 148, 85, 0.08);
|
||||
}
|
||||
|
||||
.palette-more {
|
||||
padding: 8px 14px 12px;
|
||||
display: flex;
|
||||
@ -2818,7 +2810,7 @@ textarea:focus-visible {
|
||||
.task-table-head,
|
||||
.task-row {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(190px, 1.35fr) 90px minmax(100px, 0.8fr) minmax(100px, 0.85fr) 106px;
|
||||
grid-template-columns: minmax(190px, 1.35fr) minmax(100px, 0.8fr) minmax(110px, 0.85fr) minmax(100px, 0.75fr) 106px;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
@ -2859,8 +2851,7 @@ textarea:focus-visible {
|
||||
|
||||
.task-name-cell,
|
||||
.task-trigger,
|
||||
.task-updated,
|
||||
.task-status {
|
||||
.task-updated {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 0;
|
||||
@ -2929,33 +2920,6 @@ textarea:focus-visible {
|
||||
color: var(--warn-deep);
|
||||
}
|
||||
|
||||
.task-status {
|
||||
font-size: 10.5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
flex: none;
|
||||
border-radius: 50%;
|
||||
background: var(--success);
|
||||
box-shadow: 0 0 0 3px rgba(7, 148, 85, 0.08);
|
||||
}
|
||||
|
||||
.task-status.paused .status-dot {
|
||||
background: var(--faint);
|
||||
box-shadow: 0 0 0 3px rgba(161, 172, 186, 0.12);
|
||||
}
|
||||
|
||||
.task-status.paused {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.task-status.enabled {
|
||||
color: var(--success-deep);
|
||||
}
|
||||
|
||||
.task-row-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
@ -3206,7 +3170,7 @@ textarea:focus-visible {
|
||||
@media (max-width: 1250px) {
|
||||
.task-table-head,
|
||||
.task-row {
|
||||
grid-template-columns: minmax(170px, 1.3fr) 82px minmax(90px, 0.8fr) 96px 96px;
|
||||
grid-template-columns: minmax(170px, 1.3fr) minmax(90px, 0.8fr) 96px 96px 96px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user