aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-05 21:07:37 -0700
committerAdam Soltys <[email protected]>2026-09-05 21:07:37 -0700
commit9ee75115c3cabee661866a8ade836cc6d9e519ac (patch)
treeca13f7f86e6326da3c912f79866e4925cfe41557 /src
parent2b4195b0003fdd0db258dcec3f780e0eb0668b5e (diff)
downloadcoinosv3-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')
-rw-r--r--src/features/names.js14
-rw-r--r--src/i18n.js2
2 files changed, 13 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);
}
diff --git a/src/i18n.js b/src/i18n.js
index bede662..0387550 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -732,6 +732,8 @@ const STR = {
receiveNameTab: 'Spending',
namesCustom: 'Change username',
namesCustomHow: 'Pick a new name for your payment address. Your old address stops working.',
+ namesMerchantShow: 'I\u2019m a merchant \u2014 show point-of-sale tools',
+ namesMerchantHide: 'Hide point-of-sale tools',
namesPos: 'Point of sale',
namesPosHow: 'A coinos POS terminal takes payments to this address. Create a token and enter it as the API token when you flash the terminal at coinos.io/pos. The terminal can ring up sales and see them paid; it can never spend.',
namesPosCreate: 'Create POS token',