diff options
| author | Adam Soltys <[email protected]> | 2026-09-05 21:07:37 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-05 21:07:37 -0700 |
| commit | 9ee75115c3cabee661866a8ade836cc6d9e519ac (patch) | |
| tree | ca13f7f86e6326da3c912f79866e4925cfe41557 /src/features | |
| parent | 2b4195b0003fdd0db258dcec3f780e0eb0668b5e (diff) | |
| download | coinosv3-9ee75115c3cabee661866a8ade836cc6d9e519ac.tar.gz coinosv3-9ee75115c3cabee661866a8ade836cc6d9e519ac.zip | |
POS tools are merchant-only now: the tap-to-pay link and terminal-token cards hide behind a merchant designation — a one-line "I'm a merchant — show point-of-sale tools" toggle at the foot of the payment-address card, swapping to "Hide point-of-sale tools" once on. The flag lives in the names feature state, so it follows the account to every device via wallet sync; regular users just see one quiet line instead of two cards of terminal plumbing
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MGzU12QrAA4G6BYGzGVdXz
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/names.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/features/names.js b/src/features/names.js index d23011b..cdcbfbf 100644 --- a/src/features/names.js +++ b/src/features/names.js @@ -430,13 +430,17 @@ export function namesFeature(ctx) { h('h3', {}, title), how ? h('p', { class: 'small muted', style: 'margin:0' }, how) : null, ...body); + // POS surfaces are MERCHANT tools: hidden for everyone else behind a + // one-line toggle on the address card. The flag lives in the names + // feature state, so it follows the account to every device via sync. + const merchant = !!st.merchant; return [ card('owndomain', t('namesOwnDomain'), t('namesOwnDomainHow'), h('div', { class: 'addr-box break', style: 'font-size:11px' }, `${st.name}.user._bitcoin-payment.yourdomain.com. CNAME ${st.name}.user._bitcoin-payment.${domain}.`)), card('ownnode', t('namesOwnNode'), t('namesOwnNodeMenuHow'), ownNodeSection()), - posLinkCard(st), - posCard(st), + merchant ? posLinkCard(st) : null, + merchant ? posCard(st) : null, card('custom', t('namesCustom'), t('namesCustomHow'), claimForm(false)), card('names', t('namesTitle'), null, h('div', { class: 'addr-box break', style: 'font-size:14px' }, addr), @@ -444,7 +448,11 @@ export function namesFeature(ctx) { copyBtn(addr, t('namesCopy')), h('button', { class: 'btn-ghost btn-sm', onClick: async () => { await release(); toast(t('namesReleased')); render(); - } }, t('namesRelease')))), + } }, t('namesRelease'))), + h('button', { + class: 'linklike small', style: 'align-self:flex-start;margin-top:4px', + onClick: () => { save({ ...load(), merchant: !merchant }); render(); }, + }, merchant ? t('namesMerchantHide') : t('namesMerchantShow'))), ].filter(Boolean); } |
