swarm-ui: move agent creation into the agents page as a dialog
Adds a generic ui/dialog/Dialog primitive (native <dialog>, no third-party modal lib and no shadow-DOM custom element per the esbuild gap on those) and wires a "+ agent" button into AgentsPage that opens the existing create-agent form inside it, content unchanged from its former life as a standalone /create-agent route/nav item. Removes the "new agent" top-level nav entry and the /create-agent route entirely -- creation now only reachable from the roster that gets populated by it. CreateAgentPage.tsx/css renamed to CreateAgentForm.tsx/css to match its new role as a mounted component rather than a page. Screenshot-verified the dialog open/closed states against a mock server.
This commit is contained in:
parent
dabd0fc823
commit
13d7c73c12
7 changed files with 165 additions and 23 deletions
|
|
@ -4,7 +4,6 @@ import { Route, Switch } from 'wouter-preact';
|
|||
import { Shell } from './shell/Shell.js';
|
||||
import { AgentsPage } from './pages/AgentsPage.js';
|
||||
import { ComponentsPage } from './pages/ComponentsPage.js';
|
||||
import { CreateAgentPage } from './pages/CreateAgentPage.js';
|
||||
import { JobsPage } from './pages/JobsPage.js';
|
||||
import { HivesPage } from './pages/HivesPage.js';
|
||||
import { Panel } from './ui/panel/Panel.js';
|
||||
|
|
@ -23,7 +22,6 @@ export function App() {
|
|||
<Switch>
|
||||
<Route path="/" component={HivesPage} />
|
||||
<Route path="/agents" component={AgentsPage} />
|
||||
<Route path="/create-agent" component={CreateAgentPage} />
|
||||
<Route path="/jobs" component={JobsPage} />
|
||||
<Route path="/components" component={ComponentsPage} />
|
||||
<Route component={NotFound} />
|
||||
|
|
|
|||
Loading…
Reference in a new issue