swarm-ui: shared Hint, ActionRow, Toolbar, EmptyState, ExternalLink and ExpandableCard replace per-page copies
Hint, ActionRow, Toolbar, EmptyState and ExternalLink replace the muted text, button row, refresh bar, empty line and _blank anchor that each page restyled under its own class. ExpandableCard (with a loading twin) holds the builds and recent-runs cards, which had identical head and body CSS. The create form's raw checkbox becomes CheckboxField. The components page shows each new piece.
This commit is contained in:
parent
b74b5e77e4
commit
8a2e5203ad
2 changed files with 689 additions and 427 deletions
|
|
@ -54,15 +54,8 @@
|
|||
}
|
||||
.ui-broadcast-count {
|
||||
margin-left: auto;
|
||||
color: var(--muted);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.ui-broadcast-empty {
|
||||
color: var(--muted);
|
||||
text-align: center;
|
||||
padding: 1.25em 0.75em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* The picker: each agent a labelled checkbox card, icon over name. */
|
||||
.ui-broadcast-grid {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ import {
|
|||
RefreshIntervalPicker,
|
||||
type RefreshIntervalMs,
|
||||
} from "../../ui/refresh-interval/RefreshInterval.js";
|
||||
import { EmptyState } from "../../ui/empty-state/EmptyState.js";
|
||||
import { Hint } from "../../ui/hint/Hint.js";
|
||||
import { fetchJson, usePolled } from "../../ui/polled/usePolled.js";
|
||||
import { TextAreaField } from "../../ui/text-area-field/TextAreaField.js";
|
||||
import {
|
||||
|
|
@ -170,9 +172,9 @@ export function BroadcastComposer() {
|
|||
>
|
||||
clear
|
||||
</button>
|
||||
<span class="ui-broadcast-count" role="status">
|
||||
<Hint as="span" role="status" class="ui-broadcast-count">
|
||||
{targets.length} selected
|
||||
</span>
|
||||
</Hint>
|
||||
<RefreshIntervalPicker
|
||||
id="broadcast-refresh"
|
||||
value={intervalMs}
|
||||
|
|
@ -182,11 +184,11 @@ export function BroadcastComposer() {
|
|||
</div>
|
||||
|
||||
{agents !== null && shown.length === 0 ? (
|
||||
<p class="ui-broadcast-empty">
|
||||
<EmptyState centered>
|
||||
{filter === "running" && all.length > 0
|
||||
? "no agent is running right now. Show all to pick a stopped one."
|
||||
: "no agents."}
|
||||
</p>
|
||||
</EmptyState>
|
||||
) : (
|
||||
<ul class="ui-broadcast-grid" aria-label="agents">
|
||||
{shown.map((agent) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue