diff options
| author | Adam Soltys <[email protected]> | 2026-10-02 22:28:43 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-02 22:28:43 -0700 |
| commit | e67666de3c4e2f745c38dfe04ff18e178c17b67c (patch) | |
| tree | e4c0911214742d3e8b2742dff1c7b2fbece126b7 /src/features/messages.js | |
| parent | ca0a7e0cd15bdbd553e80a7bf651acb4ba795658 (diff) | |
| download | coinosv3-e67666de3c4e2f745c38dfe04ff18e178c17b67c.tar.gz coinosv3-e67666de3c4e2f745c38dfe04ff18e178c17b67c.zip | |
Profile: the revealed public key comes with its QR
Tapping "Public key" now shows the npub as a QR above the text, for a
phone held up to the screen (White Noise, Amethyst, another coinos). The
bare lowercase npub, which every scanner takes.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src/features/messages.js')
| -rw-r--r-- | src/features/messages.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index 812a124..62e2467 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -44,6 +44,7 @@ import { inLanguage, isMachinePost } from '../lang-guess.js'; import { animateZap, warmZapSound } from '../zap-animation.js'; import { SIGNER_SILENT } from '../dm.js'; import { dlog } from '../debug.js'; +import { qrSvg } from '../qr.js'; // The coinos community's join material lives in ../community.js — shared // with the public read-only chat page so the two can never drift. @@ -8554,6 +8555,10 @@ export function messagesFeature(ctx) { ui.profEdit ? null : socialList(pk), // The npub in full, monospace, tap to copy — behind the "Public key" // link on the line above, so it costs no room until it's asked for. + // Its QR sits above it: the same key for a phone held up to the + // screen. The bare npub, lowercase — what every app's scanner takes. + ui.profEdit || ui.npubShown !== pk || !npub ? null + : h('div', { class: 'npub-qr', style: 'align-self:center', html: qrSvg(npub) }), ui.profEdit || ui.npubShown !== pk ? null : h('button', { type: 'button', class: 'addr-box break npub-box', title: t('copy'), style: 'font-size:11px;cursor:pointer;text-align:left;width:100%', |
