fix(v2)(ui): finish expanding self-closing q-* tags (rules-attribute corner case)
The earlier mass rewrite in cb19ba3 used a regex with `[^>]*?` to match
attribute spans, which stops at the first `>` it encounters. That broke
on tags with `:rules="[v => ...]"` where the JS arrow function's `>`
character truncated the match short of the actual `/>`. 8 tags survived
the rewrite (mostly form fields in dialog bodies). The Add-machine
dialog was the most visible victim — Vue's compiler tried to make
sense of the partially-malformed q-input and dumped the machine_npub
field plus the next two siblings side-by-side instead of stacked.
Fix: replaced the regex pass with a small stateful scanner that walks
the file tag-by-tag and is quote-aware (treats `>` inside paired
double or single quotes as literal characters, not tag terminators).
The scanner found and expanded the remaining 8 tags + verified zero
self-closing q-* tags remain anywhere in the template. 343 q-* opens
total in the file.
Caught while clicking through the Add-machine dialog in the UI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
32484e3ce8
commit
8968c0ae07
1 changed files with 11 additions and 11 deletions
|
|
@ -33,7 +33,7 @@
|
||||||
class="q-mb-md"
|
class="q-mb-md"
|
||||||
:class="superConfig.super_fee_pct > 0 ? 'bg-blue-1 text-grey-9' : 'bg-grey-2 text-grey-9'">
|
:class="superConfig.super_fee_pct > 0 ? 'bg-blue-1 text-grey-9' : 'bg-grey-2 text-grey-9'">
|
||||||
<template v-slot:avatar>
|
<template v-slot:avatar>
|
||||||
<q-icon name="account_balance" :color="superConfig.super_fee_pct > 0 ? 'blue' : 'grey'" />
|
<q-icon name="account_balance" :color="superConfig.super_fee_pct > 0 ? 'blue' : 'grey'"></q-icon>
|
||||||
</template>
|
</template>
|
||||||
<span :style="{fontWeight: 500}">
|
<span :style="{fontWeight: 500}">
|
||||||
LNbits platform fee:
|
LNbits platform fee:
|
||||||
|
|
@ -762,7 +762,7 @@
|
||||||
:rules="[
|
:rules="[
|
||||||
v => !!v || 'Required',
|
v => !!v || 'Required',
|
||||||
v => (v && v.length >= 32) || 'Looks too short'
|
v => (v && v.length >= 32) || 'Looks too short'
|
||||||
]" />
|
]"></q-input>
|
||||||
|
|
||||||
<q-select
|
<q-select
|
||||||
v-model="addMachineDialog.data.wallet_id"
|
v-model="addMachineDialog.data.wallet_id"
|
||||||
|
|
@ -771,7 +771,7 @@
|
||||||
emit-value map-options
|
emit-value map-options
|
||||||
class="q-mb-md"
|
class="q-mb-md"
|
||||||
dense outlined
|
dense outlined
|
||||||
:rules="[v => !!v || 'Pick a wallet']" />
|
:rules="[v => !!v || 'Pick a wallet']"></q-select>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
v-model.number="addMachineDialog.data.fallback_commission_pct"
|
v-model.number="addMachineDialog.data.fallback_commission_pct"
|
||||||
|
|
@ -1039,7 +1039,7 @@
|
||||||
label="Note"
|
label="Note"
|
||||||
type="textarea" autogrow
|
type="textarea" autogrow
|
||||||
:rules="[v => (v && v.trim().length > 0) || 'Note cannot be empty']"
|
:rules="[v => (v && v.trim().length > 0) || 'Note cannot be empty']"
|
||||||
dense outlined />
|
dense outlined></q-input>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-actions align="right">
|
<q-card-actions align="right">
|
||||||
<q-btn flat label="Cancel" v-close-popup></q-btn>
|
<q-btn flat label="Cancel" v-close-popup></q-btn>
|
||||||
|
|
@ -1103,13 +1103,13 @@
|
||||||
label="Liquidity provider"
|
label="Liquidity provider"
|
||||||
emit-value map-options
|
emit-value map-options
|
||||||
class="q-mb-md" dense outlined
|
class="q-mb-md" dense outlined
|
||||||
:rules="[v => !!v || 'Pick an LP']" />
|
:rules="[v => !!v || 'Pick an LP']"></q-select>
|
||||||
|
|
||||||
<q-input v-model.number="depositDialog.data.amount"
|
<q-input v-model.number="depositDialog.data.amount"
|
||||||
label="Amount (fiat)"
|
label="Amount (fiat)"
|
||||||
type="number" step="0.01" min="0"
|
type="number" step="0.01" min="0"
|
||||||
class="q-mb-md" dense outlined
|
class="q-mb-md" dense outlined
|
||||||
:rules="[v => v > 0 || 'Must be > 0']" />
|
:rules="[v => v > 0 || 'Must be > 0']"></q-input>
|
||||||
|
|
||||||
<q-input v-model="depositDialog.data.currency"
|
<q-input v-model="depositDialog.data.currency"
|
||||||
label="Currency"
|
label="Currency"
|
||||||
|
|
@ -1185,21 +1185,21 @@
|
||||||
emit-value map-options
|
emit-value map-options
|
||||||
class="q-mb-md"
|
class="q-mb-md"
|
||||||
dense outlined
|
dense outlined
|
||||||
:rules="[v => !!v || 'Required']" />
|
:rules="[v => !!v || 'Required']"></q-select>
|
||||||
|
|
||||||
<q-input v-if="clientDialog.mode === 'add'"
|
<q-input v-if="clientDialog.mode === 'add'"
|
||||||
v-model="clientDialog.data.user_id"
|
v-model="clientDialog.data.user_id"
|
||||||
label="LP's LNbits user_id"
|
label="LP's LNbits user_id"
|
||||||
hint="The LP shares this from their LNbits account settings"
|
hint="The LP shares this from their LNbits account settings"
|
||||||
class="q-mb-md" dense outlined
|
class="q-mb-md" dense outlined
|
||||||
:rules="[v => !!v || 'Required']" />
|
:rules="[v => !!v || 'Required']"></q-input>
|
||||||
|
|
||||||
<q-input v-if="clientDialog.mode === 'add'"
|
<q-input v-if="clientDialog.mode === 'add'"
|
||||||
v-model="clientDialog.data.wallet_id"
|
v-model="clientDialog.data.wallet_id"
|
||||||
label="LP's wallet_id (receives DCA)"
|
label="LP's wallet_id (receives DCA)"
|
||||||
hint="The LP's wallet where their sats land"
|
hint="The LP's wallet where their sats land"
|
||||||
class="q-mb-md" dense outlined
|
class="q-mb-md" dense outlined
|
||||||
:rules="[v => !!v || 'Required']" />
|
:rules="[v => !!v || 'Required']"></q-input>
|
||||||
|
|
||||||
<q-input v-model="clientDialog.data.username"
|
<q-input v-model="clientDialog.data.username"
|
||||||
label="Display name (optional)"
|
label="Display name (optional)"
|
||||||
|
|
@ -1275,14 +1275,14 @@
|
||||||
label="Funding wallet (yours)"
|
label="Funding wallet (yours)"
|
||||||
emit-value map-options
|
emit-value map-options
|
||||||
class="q-mb-md" dense outlined
|
class="q-mb-md" dense outlined
|
||||||
:rules="[v => !!v || 'Pick a wallet']" />
|
:rules="[v => !!v || 'Pick a wallet']"></q-select>
|
||||||
|
|
||||||
<q-input v-model.number="settleBalanceDialog.data.exchange_rate"
|
<q-input v-model.number="settleBalanceDialog.data.exchange_rate"
|
||||||
label="Exchange rate (sats per 1 fiat unit)"
|
label="Exchange rate (sats per 1 fiat unit)"
|
||||||
hint="You set the rate. Use exchange spot, midpoint, or a favourable gesture."
|
hint="You set the rate. Use exchange spot, midpoint, or a favourable gesture."
|
||||||
type="number" step="0.0001" min="0"
|
type="number" step="0.0001" min="0"
|
||||||
class="q-mb-md" dense outlined
|
class="q-mb-md" dense outlined
|
||||||
:rules="[v => v > 0 || 'Must be > 0']" />
|
:rules="[v => v > 0 || 'Must be > 0']"></q-input>
|
||||||
|
|
||||||
<q-input v-model.number="settleBalanceDialog.data.amount_fiat"
|
<q-input v-model.number="settleBalanceDialog.data.amount_fiat"
|
||||||
label="Amount (fiat) — leave blank to settle full remaining"
|
label="Amount (fiat) — leave blank to settle full remaining"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue