{{/* agents — GET /agents, the tokens that let a program drive this person's decks. The share page's screen, for the share page's reason: a credential that is shown once has to be shown well. Four things in the order they matter — the token that was just minted, what a token can do, the agents that already exist with the one button that turns each of them off, and the form that makes another. The new token is a callout plus a read-only field rather than a line of prose, because the whole job of this screen at that moment is "select this and copy it", and a field is what a browser lets you select cleanly with no script at all. */}} {{define "content"}} {{template "page-header" dict "Title" .Title}} {{if .NewToken}}
{{template "callout" dict "Tone" "warning" "Title" .NewTitle "Body" .NewHint}} {{/* Hand-written rather than {{template "field-text"}} for one attribute: readonly, which that partial's contract does not carry. The markup is field-text's own, attribute for attribute, so the control still looks and reads like every other field on every other screen — share.html says the same thing, and the day readonly joins the partial both become one-line calls again. */}}
{{.CopyHint}}
{{if .NewPrincipal}}

{{.NewPrincipal}}

{{end}}

{{.NewUse}}

{{end}}

{{.Lead}}

{{template "callout" dict "Tone" "warning" "Title" .WarningTitle "Body" .Warning}} {{if .Agents}}
{{range .Agents}}
{{.Principal}} {{.Created}} {{template "status-pill" dict "Tone" .StatusTone "Label" .StatusLabel}} {{if not .Revoked}} {{/* aria-label, because "Revoke" repeated down a list does not say which agent it revokes — list-row-action's ActionAria rule, applied to a hand-written row. */}}
{{end}}
{{end}}
{{else}}
{{template "empty-state" dict "Title" .EmptyTitle "Body" .EmptyBody}}
{{end}}
{{template "field-text" dict "Name" "name" "Label" .NameLabel "Hint" .NameHint "Value" .NameValue "Required" true "Error" (index .Errors "Name")}} {{template "form-foot" dict "Submit" .CreateLabel}}
{{end}}