diff options
| author | Adam Soltys <[email protected]> | 2026-09-21 08:46:46 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-21 08:46:46 -0700 |
| commit | 9a03fafbb0a49c87fd9e6269f7db020caf62e0c6 (patch) | |
| tree | db772c88c412e66ad999299c297f59df4137dcc8 /src | |
| parent | e32e34ee218013616257882d701dedc98d7a5edc (diff) | |
| download | coinosv3-9a03fafbb0a49c87fd9e6269f7db020caf62e0c6.tar.gz coinosv3-9a03fafbb0a49c87fd9e6269f7db020caf62e0c6.zip | |
Point of sale: the tip screen shows an invoice error, and both screens say when the invoice is being made.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/features/pos.js | 10 | ||||
| -rw-r--r-- | src/i18n.js | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/features/pos.js b/src/features/pos.js index c7e5882..e6a2abf 100644 --- a/src/features/pos.js +++ b/src/features/pos.js @@ -85,7 +85,8 @@ export function posFeature(ctx) { p.sale = sale; p.step = 'invoice'; hook('arkLnWatch', inv.id, (a) => settle(sale, a)); } catch (e) { - p.error = e.message || String(e); + console.warn('pos: invoice failed', e); + p.error = (e && e.message) || String(e); } p.busy = false; render(); } @@ -137,7 +138,8 @@ export function posFeature(ctx) { getUnit() !== 'fiat' && billSat() && fiatLine(billSat()) ? h('div', { class: 'small muted', style: 'text-align:right' }, fiatLine(billSat())) : null, h('input', { type: 'text', placeholder: t('posNoteHint'), value: p.note, maxlength: '80', onInput: (e) => { p.note = e.target.value; } }), p.error ? h('div', { class: 'notice error small' }, p.error) : null, - h('button', { class: 'btn-primary btn-block', disabled: !!p.busy, onClick: charge }, p.busy ? h('span', { class: 'spinner sm' }) : t('posCharge'))), + h('button', { class: 'btn-primary btn-block', disabled: !!p.busy, onClick: charge }, p.busy ? h('span', { class: 'spinner sm' }) : t('posCharge')), + p.busy ? h('div', { class: 'small muted', style: 'text-align:center' }, t('posMakingInvoice')) : null), tipSettingsCard(s), salesCard(s), back()); @@ -202,9 +204,11 @@ export function posFeature(ctx) { h('input', { type: 'text', inputmode: 'decimal', placeholder: '0', value: p.tipCustom, autofocus: true, onInput: (e) => { p.tipCustom = e.target.value; render(); } }), h('span', { class: 'small muted', style: 'align-self:center;padding:0 8px' }, unitLabel())) : null, p.tipMode != null ? h('div', { class: 'small muted' }, t('posTotalLine', { n: fmtAmount(bill + tip) + ' ' + unitLabel() })) : null, + p.error ? h('div', { class: 'notice error small', style: 'width:100%' }, p.error) : null, h('button', { class: 'btn-primary btn-block', disabled: p.tipMode == null || !!p.busy, onClick: () => makeSale(bill, tip, p.tipMode === 'custom' || p.tipMode === 'none' ? 0 : p.tipMode) }, - p.busy ? h('span', { class: 'spinner sm' }) : t('posContinue'))), + p.busy ? h('span', { class: 'spinner sm' }) : t('posContinue')), + p.busy ? h('div', { class: 'small muted' }, t('posMakingInvoice')) : null), h('button', { class: 'btn-ghost btn-block', onClick: () => { p.step = 'amount'; render(); } }, t('back'))); } function invoiceScreen(p) { diff --git a/src/i18n.js b/src/i18n.js index 721bf98..2fa2dc3 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -275,6 +275,7 @@ const STR = { posTipWord: 'tip', posVoid: 'cancelled', posAwaiting: 'awaiting payment', + posMakingInvoice: 'Creating the invoice…', linkHandlerTitle: 'Open links here', linkHandlerDesc: 'Make this app the one your browser opens for nostr links (what njump calls "Your default web app") and bitcoin: links.', linkHandlerNostr: 'nostr links', |
