From cdbdc9b509d14ba386e01ecb87a80e54ef28addb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 4 Aug 2026 01:28:51 -0700 Subject: The name is edited where the name is — a pencil by the address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- src/features/names.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/features/names.js b/src/features/names.js index 10ba336..d944957 100644 --- a/src/features/names.js +++ b/src/features/names.js @@ -243,6 +243,7 @@ export function namesFeature(ctx) { const signer = await Promise.resolve(hook('nostrLoginResume')).catch(() => null); await claim(name, signer ? { signer, manager: wallet.nostrPubkey() } : {}); ui.nameClaim = ''; + ui.nameEditOpen = false; toast(t('namesClaimed', { name: `${name}@${DOMAIN}` })); } catch (e) { ui.nameClaimError = e.message; } ui.busy = false; render(); @@ -308,14 +309,18 @@ export function namesFeature(ctx) { return h('div', { class: 'card col', style: 'align-items:center;gap:14px' }, seg, h('div', { html: qrSvg(addr) }), - h('div', { class: 'addr-box', style: 'width:100%;text-align:center;font-size:16px' }, addr), - copyBtn(addr, t('namesCopy')), - // Still on the npub-shaped default? The people who'd want a real name - // are looking right here, not in a collapsed corner of Settings. - /^npub1/.test(st.name) ? h('details', { class: 'small faint', style: 'align-self:stretch' }, - h('summary', {}, t('namesCustom')), - h('p', { style: 'margin:4px 0' }, t('namesCustomHow')), + h('div', { class: 'row gap6', style: 'width:100%;align-items:center' }, + h('div', { class: 'addr-box', style: 'flex:1;min-width:0;text-align:center;font-size:16px' }, addr), + // the pencil is how you change the name — right where the name is + h('button', { + class: 'btn-sm', title: t('namesCustom'), + onClick: () => { ui.nameEditOpen = !ui.nameEditOpen; ui.nameClaimError = null; render(); }, + html: '', + })), + ui.nameEditOpen ? h('div', { class: 'col', style: 'gap:8px;width:100%' }, + h('p', { class: 'small muted', style: 'margin:0' }, t('namesCustomHow')), claimForm(false)) : null, + copyBtn(addr, t('namesCopy')), offerSection()); } -- cgit v1.2.3