dashboard: friendlier interval input for scheduled prompts (closes #466)
Replaces the single raw-seconds field in the SCH3DUL3D PR0MPTS creation form with a structured composer: - Preset chip row (1m / 5m / 15m / 30m / 1h / 6h / 12h / 1d / 7d / one-shot) that fills the parts inputs in one click - Four small d/h/m/s number inputs combined into total seconds on submit (all-zero = one-shot, preserving the backend null semantic) - Live "↻ every …" preview using the existing fmtDuration helper so the operator sees what they're about to queue Carry semantics extended to round-trip the split fields across state-poll re-renders; legacy `interval` carry still honoured if an older bundle is in the page. Docs (web-ui.md) updated to describe the new composer.
This commit is contained in:
parent
4fdc061c9d
commit
caa0c6ce4c
3 changed files with 168 additions and 16 deletions
|
|
@ -1665,6 +1665,50 @@ body.flow-shell .tabbar .tab.active.tab-link {
|
|||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/* Interval composer (#466). Preset chip row + d/h/m/s inputs + live
|
||||
preview, so the operator never has to multiply seconds by hand. */
|
||||
.schedule-interval-presets {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.3em;
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
.btn-interval-preset {
|
||||
color: var(--cyan);
|
||||
border-color: var(--cyan);
|
||||
font-size: 0.75em;
|
||||
padding: 0.15em 0.55em;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
.btn-interval-oneshot {
|
||||
color: var(--muted);
|
||||
border-color: var(--muted);
|
||||
}
|
||||
.schedule-interval-parts {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.35em;
|
||||
margin-top: 0.4em;
|
||||
}
|
||||
.schedule-interval-num {
|
||||
width: 4em;
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.schedule-interval-unit {
|
||||
color: var(--muted);
|
||||
font-size: 0.85em;
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
.schedule-interval-preview {
|
||||
margin-top: 0.4em;
|
||||
color: var(--cyan);
|
||||
font-size: 0.9em;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.schedule-interval-preview-oneshot { color: var(--muted); font-style: italic; }
|
||||
|
||||
.schedules {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
|||
Loading…
Reference in a new issue