aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-09 00:17:17 -0700
committerAdam Soltys <[email protected]>2026-10-09 00:17:23 -0700
commit02a6468807c6f4f34f56b2bafb091c1b6ff25f0e (patch)
tree0c4accbe31c1086986e92ba4f34ce9e0531e60fc /src
parent882ceda969af232e14a2a932b66c45b2e6e3f04f (diff)
downloadcoinosv3-02a6468807c6f4f34f56b2bafb091c1b6ff25f0e.tar.gz
coinosv3-02a6468807c6f4f34f56b2bafb091c1b6ff25f0e.zip
Profile public key: solid border instead of dashed, a copy icon beside the key, and a slightly larger font (13px)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/features/messages.js4
-rw-r--r--src/style.css8
2 files changed, 10 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 48596f2..540f942 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -9744,9 +9744,9 @@ export function messagesFeature(ctx) {
: 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%',
onClick: async () => { try { await navigator.clipboard.writeText(npub); toast(t('copied')); } catch {} },
- }, npub),
+ }, h('span', { class: 'npub-text' }, npub),
+ h('span', { class: 'npub-copy', 'aria-hidden': 'true', html: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>' })),
ui.profEdit
? h('div', { class: 'col', style: 'gap:8px' },
// the username IS the payment address and NIP-05 — the frozen
diff --git a/src/style.css b/src/style.css
index 9b5f5d9..422e51a 100644
--- a/src/style.css
+++ b/src/style.css
@@ -292,6 +292,14 @@ textarea.send-dest::placeholder { font-family: var(--sans); }
font-family: var(--mono); font-size: 15px; color: var(--ink); background: var(--surface2); border: 1px dashed var(--line-strong);
border-radius: 11px; padding: 12px 14px; word-break: break-all; text-align: center;
}
+/* the profile's npub: solid frame, copy icon beside the key */
+.npub-box {
+ display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer;
+ text-align: left; font-size: 13px; line-height: 1.45; border-style: solid;
+}
+.npub-box .npub-text { flex: 1; min-width: 0; }
+.npub-box .npub-copy { flex: none; display: flex; color: var(--muted); }
+.npub-box:hover .npub-copy { color: var(--ink); }
/* quiet edit/copy affordances living inside the address box */
.addr-editable { position: relative; padding-right: 62px; }
.addr-actions {