aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/zaps.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-19 22:36:55 -0700
committerAdam Soltys <[email protected]>2026-09-19 22:36:55 -0700
commitb9f8ec30e6681c623162bb36e44df16934740b32 (patch)
tree4deeaa3f460f4e1af37b8968eed4fcff924bd4dc /src/features/zaps.js
parent1b142c92ce869a6ebe97825931ef3553255ba58e (diff)
downloadcoinosv3-b9f8ec30e6681c623162bb36e44df16934740b32.tar.gz
coinosv3-b9f8ec30e6681c623162bb36e44df16934740b32.zip
Zaps: the sound can be switched off — from the held bolt or Settings → Nostr.
A prefs flag (zapSound, absent = on) synced with the zap amount. The strike and the tally are unchanged; only the clip stays quiet, and the clip chunk is not even fetched while it's off. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src/features/zaps.js')
-rw-r--r--src/features/zaps.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/features/zaps.js b/src/features/zaps.js
index 54c8f58..d6b2271 100644
--- a/src/features/zaps.js
+++ b/src/features/zaps.js
@@ -476,7 +476,11 @@ export function zapsFeature(ctx) {
style: 'text-align:right',
onInput: (e) => { const n = parseInt(e.target.value, 10); if (n > 0) ctx.setZapDefaultSat(n); } }),
h('span', { class: 'small muted', style: 'align-self:center;padding:0 6px' }, 'sats'))),
- h('div', { class: 'small faint' }, t('zapDefaultHint')))];
+ h('div', { class: 'small faint' }, t('zapDefaultHint')),
+ ctx.setZapSound ? h('label', { class: 'row gap6', style: 'align-items:center;cursor:pointer;margin-top:4px' },
+ h('input', { type: 'checkbox', checked: ctx.zapSound(), style: 'width:18px;height:18px;accent-color:var(--accent);margin:0',
+ onChange: (e) => { ctx.setZapSound(e.target.checked); } }),
+ h('span', { class: 'small' }, t('zapSoundToggle'))) : null)];
},
};
}