From 8968c0ae073bee94dd89ba959f590161728416a3 Mon Sep 17 00:00:00 2001 From: Padreug Date: Thu, 14 May 2026 19:25:03 +0200 Subject: [PATCH] fix(v2)(ui): finish expanding self-closing q-* tags (rules-attribute corner case) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- templates/satmachineadmin/index.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/templates/satmachineadmin/index.html b/templates/satmachineadmin/index.html index 8faf730..584a27b 100644 --- a/templates/satmachineadmin/index.html +++ b/templates/satmachineadmin/index.html @@ -33,7 +33,7 @@ class="q-mb-md" :class="superConfig.super_fee_pct > 0 ? 'bg-blue-1 text-grey-9' : 'bg-grey-2 text-grey-9'"> LNbits platform fee: @@ -762,7 +762,7 @@ :rules="[ v => !!v || 'Required', v => (v && v.length >= 32) || 'Looks too short' - ]" /> + ]"> + :rules="[v => !!v || 'Pick a wallet']"> + dense outlined> @@ -1103,13 +1103,13 @@ label="Liquidity provider" emit-value map-options class="q-mb-md" dense outlined - :rules="[v => !!v || 'Pick an LP']" /> + :rules="[v => !!v || 'Pick an LP']"> + :rules="[v => v > 0 || 'Must be > 0']"> + :rules="[v => !!v || 'Required']"> + :rules="[v => !!v || 'Required']"> + :rules="[v => !!v || 'Required']"> + :rules="[v => !!v || 'Pick a wallet']"> + :rules="[v => v > 0 || 'Must be > 0']">