{{/* share — GET /d/{sqid}/share, a deck's read-only links. The screen is three things in the order they matter: the link that was just made (once, and never again), what a link costs to hand out, and the links that already exist with the one button that turns each of them off. The new link 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 the thing a browser lets you select cleanly with no script at all. */}} {{define "content"}} {{template "back-nav" dict "Href" .BackHref "Label" .BackLabel}} {{template "page-header" dict "Title" .Title}} {{if .NewURL}}
{{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 — and the day readonly joins the partial, this becomes a one-line call again. */}}
{{.CopyHint}}
{{end}}

{{.Lead}}

{{template "callout" dict "Tone" "warning" "Title" .WarningTitle "Body" .Warning}} {{if .Links}}
{{range .Links}}
{{.Created}} {{.Views}} {{template "status-pill" dict "Tone" .StatusTone "Label" .StatusLabel}} {{if not .Revoked}} {{/* aria-label, because "Revoke" repeated down a list does not say which link it revokes, and a link's only name is when it was made — agents.html's row, with this list's own handle. */}}
{{end}}
{{end}}
{{else}}
{{template "empty-state" dict "Title" .EmptyTitle "Body" .EmptyBody}}
{{end}}
{{end}}