fix: don't show when custom badge is not set (#2827)

This commit is contained in:
Tiago Vasconcelos 2024-12-16 08:50:19 +00:00 committed by GitHub
parent b66a8b3de9
commit 740180d332
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -83,7 +83,7 @@
filled filled
type="text" type="text"
tip="Custom Badge" tip="Custom Badge"
v-model="formData.lnbits_custom_badge" v-model.trim="formData.lnbits_custom_badge"
label="Custom Badge 'USE WITH CAUTION - LNbits wallet is still in BETA'" label="Custom Badge 'USE WITH CAUTION - LNbits wallet is still in BETA'"
></q-input> ></q-input>
</div> </div>

View file

@ -67,10 +67,11 @@
</q-badge> </q-badge>
{%endif%} {% if LNBITS_CUSTOM_BADGE is defined %} {%endif%} {% if LNBITS_CUSTOM_BADGE is defined %}
<q-badge <q-badge
v-if="`{{LNBITS_CUSTOM_BADGE}}`.length > 0"
v-show="$q.screen.gt.sm" v-show="$q.screen.gt.sm"
color="{{ LNBITS_CUSTOM_BADGE_COLOR }}" color="{{ LNBITS_CUSTOM_BADGE_COLOR }}"
class="q-mr-md" class="q-mr-md"
label="{{LNBITS_CUSTOM_BADGE}}" label="{{LNBITS_CUSTOM_BADGE|e}}"
> >
</q-badge> </q-badge>
{%endif%} {% if LNBITS_SERVICE_FEE > 0 %} {%endif%} {% if LNBITS_SERVICE_FEE > 0 %}