From f53214058ac6bcf1b9f8a4bb4e199dc5101e04e3 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Wed, 26 Aug 2026 11:04:43 +0100 Subject: [PATCH 1/2] fix(tpos): hide tap to pay outside wrapper --- static/components/payment-method-selector.js | 3 ++- static/js/tpos.js | 3 +++ templates/tpos/_cart.html | 1 + templates/tpos/dialogs.html | 1 + tests/check_static_load.js | 14 ++++++++++++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/static/components/payment-method-selector.js b/static/components/payment-method-selector.js index 1fd611e..cc9bd7f 100644 --- a/static/components/payment-method-selector.js +++ b/static/components/payment-method-selector.js @@ -5,6 +5,7 @@ window.app.component('tpos-payment-method-selector', { currency: {type: String, required: true}, currencySymbol: {type: String, required: true}, fiatProvider: {type: Boolean, default: false}, + tapToPayEnabled: {type: Boolean, default: false}, allowCashSettlement: {type: Boolean, default: false}, onchainEnabled: {type: Boolean, default: false}, tabsEnabled: {type: Boolean, default: false}, @@ -79,7 +80,7 @@ window.app.component('tpos-payment-method-selector', { -
+
:currency="currency" :currency-symbol="currencySymbol" :fiat-provider="!!fiatProvider" + :tap-to-pay-enabled="tapToPayEnabled" :allow-cash-settlement="allowCashSettlement" :onchain-enabled="onchainEnabled" :tabs-enabled="tabsEnabled" diff --git a/templates/tpos/dialogs.html b/templates/tpos/dialogs.html index e86a0c3..821b5ac 100644 --- a/templates/tpos/dialogs.html +++ b/templates/tpos/dialogs.html @@ -333,6 +333,7 @@
:currency="currency" :currency-symbol="currencySymbol" :fiat-provider="!!fiatProvider" + :tap-to-pay-enabled="tapToPayEnabled" :allow-cash-settlement="allowCashSettlement" :onchain-enabled="onchainEnabled" :tabs-enabled="tabsEnabled" diff --git a/tests/check_static_load.js b/tests/check_static_load.js index eaeac86..aef1109 100644 --- a/tests/check_static_load.js +++ b/tests/check_static_load.js @@ -184,6 +184,20 @@ for (const page of pages) { } const html = page.templates.map(t => templateWithIncludes(t)).join('\n') + if (page.name === 'public tpos page (tpos.html)') { + const tapToPayBindings = html.match( + /:tap-to-pay-enabled="tapToPayEnabled"/g + ) + const selector = registered['tpos-payment-method-selector'] + if ( + tapToPayBindings?.length !== 2 || + !selector?.props?.tapToPayEnabled || + !selector.template.includes('v-if="tapToPayEnabled"') + ) { + failures += 1 + console.log('FAIL Tap to Pay visibility is not wrapper-gated') + } + } for (const tag of usedComponentTags(html)) { if (registered[tag]) { console.log(`ok <${tag}> is registered`) From 4efd93f4dccfc162f5b1630131dd7cb87d4b3834 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Wed, 26 Aug 2026 11:05:09 +0100 Subject: [PATCH 2/2] fix(tpos): correct fiat payment aria labels --- static/components/payment-method-selector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/components/payment-method-selector.js b/static/components/payment-method-selector.js index cc9bd7f..fb6e347 100644 --- a/static/components/payment-method-selector.js +++ b/static/components/payment-method-selector.js @@ -71,7 +71,7 @@ window.app.component('tpos-payment-method-selector', { color="secondary" rounded :disable="disabled" - :aria-label="currency + ' TAP'" + :aria-label="'Cash ' + currency" @click="$emit('select', 'cash')" >
@@ -87,7 +87,7 @@ window.app.component('tpos-payment-method-selector', { color="secondary" rounded :disable="disabled" - :aria-label="'CASH ' + currency" + :aria-label="'Tap to Pay ' + currency" @click="$emit('select', 'fiat_tap')" >