fix(peering): key display, reliable copy, key-id hint (#136) #137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/peering-key-display"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #136.
Root cause: the issue-key handler read
r.keyoff the rawResponsereturned byapi()without ever calling.json()— the one-time key was never displayed (empty bar) and the click-to-copy copiedundefined. The stray "Copied" bubble at the viewport origin came fromcopyTextbeing called without itsbtnpositioning argument.Fix:
await res.json()).<p>with a labelled one-time-key block: "One-time key for {peer} — copy it now, it is not shown again." + readonly mono input + explicit Copy button. Copy selects the visible input and usesdocument.execCommand("copy")first (works inside a modal dialog on plain-HTTP LAN origins wherenavigator.clipboarddoes not exist), async clipboard as the HTTPS path. Feedback lands in the dialog's own message line.listKeysnow returns the stored non-secretid(derived from the public key; the secret isKeyPrefix + b64(priv)and never stored). The issued list rendersHyrsh 3f2a91c8d1…in faded mono so a row is identifiable.i18n en/de/fr/it. Green on the branch: gofmt/vet clean, full
go test ./..., both JS blocks passnode --check. Also removes the two scout workflows from.forgejo/workflows/.