swarm-ui: move create-agent page off /agents, rename to CreateAgentPage

mara: the route should reflect creating an agent, and stay separate
from a future agent list page. Renamed AgentsPage -> CreateAgentPage
(file, component, css classes) and moved the route from /agents to
/create-agent - flat, not /agents/new, since index.html's relative
asset links only resolve correctly one path segment deep (filed
separately as a real bug, not fixed here). Leaves the bare /agents
path free for a future roster page.
This commit is contained in:
iris 2026-08-16 23:51:45 +02:00 committed by mara
commit 47e89c1c93
4 changed files with 48 additions and 37 deletions

View file

@ -0,0 +1,54 @@
/* <CreateAgentPage> the create-agent form. First form in this package,
so its input/button chrome lives here rather than in `ui/` see the
component's own comment for why. Reuses the same base16 slots
(../theme.css) every other component draws from. */
.create-agent-intro {
margin: 0 0 1.5em;
color: var(--muted);
}
.create-agent-form {
display: flex;
align-items: flex-end;
gap: 0.75em;
flex-wrap: wrap;
}
.create-agent-field {
display: flex;
flex-direction: column;
gap: 0.3em;
}
.create-agent-label {
font-size: 0.85em;
color: var(--muted);
}
.create-agent-input {
background: var(--bg);
color: var(--fg);
border: 1px solid var(--purple-dim);
border-radius: 0.3em;
padding: 0.4em 0.6em;
font: inherit;
min-width: 16em;
}
.create-agent-submit {
background: var(--purple-dim);
color: var(--fg);
border: none;
border-radius: 0.3em;
padding: 0.5em 1.2em;
font: inherit;
cursor: pointer;
}
.create-agent-submit:disabled {
opacity: 0.6;
cursor: default;
}
.create-agent-result {
margin-top: 1em;
}
.create-agent-result-ok {
color: var(--green);
}
.create-agent-result-error {
color: var(--red);
}