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
1 changed files with 689 additions and 427 deletions
|
|
@ -45,7 +45,9 @@ import {
|
|||
InferenceFields,
|
||||
type InferenceDraft,
|
||||
} from "../agent/detail/AgentInference.js";
|
||||
import { CheckboxField } from "../ui/checkbox-field/CheckboxField.js";
|
||||
import { FormField } from "../ui/form-field/FormField.js";
|
||||
import { Hint } from "../ui/hint/Hint.js";
|
||||
import { MultiselectFilterOptions } from "../ui/multiselect-filter/MultiselectFilter.js";
|
||||
import {
|
||||
initialSelection,
|
||||
|
|
@ -325,12 +327,12 @@ export function CreateAgentForm({
|
|||
/>
|
||||
)}
|
||||
{done && (
|
||||
<div class="create-agent-result create-agent-result-ok">
|
||||
<Hint tone="ok" as="div" class="create-agent-result">
|
||||
<p>
|
||||
Queued as job node #{result.nodeId} —{" "}
|
||||
<Link href="/jobs">watch it in jobs</Link>.
|
||||
</p>
|
||||
</div>
|
||||
</Hint>
|
||||
)}
|
||||
{!done && step === "identity" && (
|
||||
<div class="create-agent-fields">
|
||||
|
|
@ -409,7 +411,9 @@ export function CreateAgentForm({
|
|||
onInput={setAgentsMd}
|
||||
/>
|
||||
{refusal !== null && (
|
||||
<p class="create-agent-field-error">{refusal}</p>
|
||||
<Hint tone="error" class="create-agent-field-error">
|
||||
{refusal}
|
||||
</Hint>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
|
@ -438,14 +442,12 @@ export function CreateAgentForm({
|
|||
)}
|
||||
</div>
|
||||
</FormField>
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={internet}
|
||||
onChange={() => setInternet((v) => !v)}
|
||||
/>{" "}
|
||||
Unrestricted internet
|
||||
</label>
|
||||
<CheckboxField
|
||||
id="create-agent-internet"
|
||||
label="Unrestricted internet"
|
||||
checked={internet}
|
||||
onChange={setInternet}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{!done && step === "resources" && (
|
||||
|
|
@ -531,9 +533,9 @@ export function CreateAgentForm({
|
|||
back
|
||||
</Button>
|
||||
{problem !== null && (step !== "identity" || name !== "") && (
|
||||
<span class="create-agent-hint" role="status">
|
||||
<Hint as="span" role="status" class="create-agent-hint">
|
||||
{problem}
|
||||
</span>
|
||||
</Hint>
|
||||
)}
|
||||
{step === "summary" ? (
|
||||
<Button
|
||||
|
|
|
|||
Loading…
Reference in a new issue