swarm-ui: an agent's settings and AGENTS.md show placeholders while they load
BadgeSkeleton is the twin of Badge: the real Badge frame, as tall as an interactive one (the settings values are buttons), with a placeholder for its value. Permissions, resource caps, internet and allowed domains use it in place of their "loading…" text, the details popover shows lines of text, and the AGENTS.md editor a block, in place of theirs. SkeletonLines is a few stacked lines for such blocks.
This commit is contained in:
parent
38505a5864
commit
a9f0d61daa
1 changed files with 106 additions and 27 deletions
|
|
@ -20,6 +20,7 @@ import { Button } from "../../ui/button/Button.js";
|
|||
import { Dialog } from "../../ui/dialog/Dialog.js";
|
||||
import { Panel } from "../../ui/panel/Panel.js";
|
||||
import { TextField } from "../../ui/text-field/TextField.js";
|
||||
import { BadgeSkeleton } from "../../ui/skeleton/BadgeSkeleton.js";
|
||||
import "../../ui/badge-row/BadgeRow.css";
|
||||
import "./AgentLimits.css";
|
||||
|
||||
|
|
@ -127,13 +128,7 @@ export function AgentLimits({ agent }: { agent: string }) {
|
|||
</>
|
||||
) : null;
|
||||
if (caps === null) {
|
||||
return (
|
||||
errorPanel ?? (
|
||||
<span class="ui-agent-limits-muted" role="status">
|
||||
loading the resource caps…
|
||||
</span>
|
||||
)
|
||||
);
|
||||
return errorPanel ?? <BadgeSkeleton what="the resource caps" width="9em" />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Reference in a new issue