Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: egress card lists the allowed domains as plain rows with real buttons, not badges

This commit is contained in:
iris 2026-11-04 21:53:58 +01:00
commit b64ad47817
2 changed files with 13 additions and 15 deletions

View file

@ -10,7 +10,6 @@
// are the agent card's own: `AddForm` without an agent, `useAllowedDomains`.
import { useState } from "preact/hooks";
import { ApiErrorPanel } from "@hive/shared/api-error-panel.js";
import { Badge } from "@hive/shared/badge.js";
import { AddForm } from "../../agent/detail/AllowedDomains.js";
import { swarmWideEntries } from "../../agent/detail/allowed-domains.js";
import { useAllowedDomains } from "../../agent/detail/useAllowedDomains.js";
@ -61,24 +60,15 @@ function EgressBody() {
<ul class="ui-swarm-egress-list">
{swarmWide.map((e) => (
<li key={e.domain}>
<Badge value={e.domain} />{" "}
<Badge
variant="quiet"
value="remove"
title={`stop allowing ${e.domain} for every agent`}
disabled={busy}
onClick={() => void remove(e)}
/>
<code>{e.domain}</code>
<Button disabled={busy} onClick={() => void remove(e)}>
remove
</Button>
</li>
))}
</ul>
)}
<Badge
variant="quiet"
value="add"
title="allow a domain for every agent"
onClick={() => setAdding(true)}
/>
<Button onClick={() => setAdding(true)}>add a domain</Button>
<Dialog
open={adding}
onClose={() => setAdding(false)}

View file

@ -29,3 +29,11 @@
display: grid;
gap: 0.3em;
}
.ui-swarm-egress-list li {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1em;
padding: 0.25em 0;
border-bottom: 1px solid var(--border);
}