feat: per-event payment methods (extra.payment_methods)
Organizers pick which rails an event accepts — Lightning, card (fiat) or both — instead of a bare "allow fiat" toggle. `extra.payment_methods` uses the field name upstream v2 (lnbits/events#64) introduces so the eventual rebase merges cleanly; an empty list keeps the legacy rule (Lightning always, fiat when allow_fiat), and allow_fiat stays the fiat-currency carrier, kept in lockstep on save. The effective list is published as the NIP-52 tag `tickets_payment_methods` so clients render exactly the buttons the purchase endpoint will accept, and the buyer page defaults to the first accepted rail (a card-only event never submits "lightning"). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYwoAkZZmXMMmaBp4WGUBo
This commit is contained in:
parent
92642a1f24
commit
c2d9a96239
5 changed files with 94 additions and 38 deletions
|
|
@ -20,10 +20,10 @@
|
|||
<div class="col">
|
||||
<span class="text-subtitle2">Republish to Nostr</span>
|
||||
<div class="text-caption text-grey-7" style="color: #aaa">
|
||||
Re-emit every approved event so connected clients pick
|
||||
up the latest tag set. Useful after the extension
|
||||
publisher changes (e.g. new tickets_* tags) so existing
|
||||
events don't need a per-event edit.
|
||||
Re-emit every approved event so connected clients pick up the
|
||||
latest tag set. Useful after the extension publisher changes
|
||||
(e.g. new tickets_* tags) so existing events don't need a
|
||||
per-event edit.
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
|
|
@ -56,8 +56,8 @@
|
|||
></q-btn>
|
||||
</div>
|
||||
<div class="text-caption q-mt-sm" style="color: #aaa">
|
||||
Re-emit your approved events to Nostr relays. Useful after
|
||||
a publisher upgrade or if a relay dropped your events.
|
||||
Re-emit your approved events to Nostr relays. Useful after a
|
||||
publisher upgrade or if a relay dropped your events.
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
|
|
@ -228,7 +228,13 @@
|
|||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<q-badge
|
||||
v-if="col.name === 'status'"
|
||||
:color="col.value === 'approved' ? 'green' : col.value === 'proposed' ? 'orange' : 'red'"
|
||||
:color="
|
||||
col.value === 'approved'
|
||||
? 'green'
|
||||
: col.value === 'proposed'
|
||||
? 'orange'
|
||||
: 'red'
|
||||
"
|
||||
:label="col.value"
|
||||
></q-badge>
|
||||
<span v-else v-text="col.value"></span>
|
||||
|
|
@ -399,7 +405,13 @@
|
|||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||
<q-badge
|
||||
v-if="col.name === 'status'"
|
||||
:color="col.value === 'approved' ? 'green' : col.value === 'proposed' ? 'orange' : 'red'"
|
||||
:color="
|
||||
col.value === 'approved'
|
||||
? 'green'
|
||||
: col.value === 'proposed'
|
||||
? 'orange'
|
||||
: 'red'
|
||||
"
|
||||
:label="col.value"
|
||||
></q-badge>
|
||||
<span v-else v-text="col.value"></span>
|
||||
|
|
@ -587,15 +599,22 @@
|
|||
></q-input>
|
||||
</div>
|
||||
</div>
|
||||
<q-toggle
|
||||
v-model="formDialog.data.allow_fiat"
|
||||
label="Allow fiat checkout"
|
||||
left-label
|
||||
hint="Lets attendees pay through a configured fiat provider using the event currency."
|
||||
></q-toggle>
|
||||
<div class="q-mt-sm">
|
||||
<div class="text-caption text-grey-7">Payment methods *</div>
|
||||
<q-option-group
|
||||
v-model="formDialog.data.extra.payment_methods"
|
||||
type="checkbox"
|
||||
inline
|
||||
:options="paymentMethodOptions"
|
||||
></q-option-group>
|
||||
<div class="text-caption text-grey-7">
|
||||
Card / fiat checkout goes through the fiat provider configured on
|
||||
this LNbits instance. Untick Lightning for a card-only event.
|
||||
</div>
|
||||
</div>
|
||||
<q-select
|
||||
v-if="
|
||||
formDialog.data.allow_fiat &&
|
||||
acceptsFiat &&
|
||||
['sat', 'sats'].includes(
|
||||
(formDialog.data.currency || '').toLowerCase()
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue