From 0712c1474b24a858a4650422319fbc9dc8d5427a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 2 Aug 2026 19:47:39 -0700 Subject: Profile: copy icon inside the npub box instead of a "Copy key" button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An npub isn't a key — no button, no label; just a small copy glyph right-aligned in the box. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- src/features/messages.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index f95c8c7..d74c338 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -48,7 +48,7 @@ const APP_BASE = 'https://v3.coinos.io'; const CACHE_MAX = 50; // messages kept per channel / per DM thread in feature state export function messagesFeature(ctx) { - const { h, ui, render, wallet, toast, hook, copyBtn } = ctx; + const { h, ui, render, wallet, toast, hook } = ctx; // ---- persisted state ---------------------------------------------------- @@ -864,8 +864,13 @@ export function messagesFeature(ctx) { full === undefined ? h('div', { class: 'row gap6', style: 'align-items:center' }, h('span', { class: 'spinner sm' })) : full.about ? h('p', { class: 'small', style: 'margin:0;white-space:pre-wrap' }, String(full.about).slice(0, 1000)) : null, - h('div', { class: 'addr-box break', style: 'font-size:11px' }, npub), - copyBtn(npub, t('copyKey')), + h('div', { class: 'addr-box break npub-box', style: 'font-size:11px' }, + h('span', { class: 'grow', style: 'min-width:0' }, npub), + h('button', { + class: 'copy-ico', title: t('copy'), + onClick: async () => { try { await navigator.clipboard.writeText(npub); toast(t('copied')); } catch {} }, + html: '', + })), ui.profEdit ? h('div', { class: 'col', style: 'gap:8px' }, field(t('profName'), 'name'), -- cgit v1.2.3