Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: schedules page says what a past start does, no longer claims a one-shot fired

A start in the past fires the latest missed time once, right away, so the
form says that instead of 'already passed'. A one-shot past its time reads
'past' / 'time passed' (the controller's clock, not a record of firing) and
keeps its pause button. The edit form compares against what it opened with,
so a schedule changing under it is not reverted on save.
This commit is contained in:
iris 2026-10-04 17:07:29 +02:00 • committed by mara
commit 0af7f53e88
4 changed files with 45 additions and 31 deletions

View file

@ -18,7 +18,7 @@ import "./ScheduleCard.css";
const STATE_TONE: Record<ScheduleState, BadgeTone> = {
active: "positive",
paused: "warning",
done: "neutral",
past: "neutral",
};
export function ScheduleCard({
@ -65,7 +65,7 @@ export function ScheduleCard({
"paused, will not fire"
) : (
<>
fired{" "}
time passed{" "}
<span title={fmtLocal(schedule.anchor_unix)}>
<RelativeTime epochMs={schedule.anchor_unix * 1000} />
</span>
@ -76,11 +76,9 @@ export function ScheduleCard({
<Button onClick={onEdit} disabled={pending}>
edit
</Button>
{state !== "done" ? (
<Button onClick={onTogglePaused} disabled={pending}>
{schedule.paused ? "resume" : "pause"}
</Button>
) : null}
<Button onClick={onTogglePaused} disabled={pending}>
{schedule.paused ? "resume" : "pause"}
</Button>
<Button onClick={onRemove} disabled={pending}>
remove
</Button>