fix: ui issues

This commit is contained in:
Vlad Stan 2024-10-04 10:50:50 +03:00
commit 1bae6340fa
4 changed files with 10 additions and 24 deletions

View file

@ -1,7 +1,5 @@
/* globals Quasar, Vue, _, VueQrcode, windowMixin, LNbits, LOCALE */ /* globals Quasar, Vue, _, VueQrcode, windowMixin, LNbits, LOCALE */
Vue.component(VueQrcode.name, VueQrcode)
const locationPath = [ const locationPath = [
window.location.protocol, window.location.protocol,
'//', '//',
@ -21,9 +19,9 @@ const mapPayLink = obj => {
return obj return obj
} }
new Vue({ window.app = Vue.createApp({
el: '#vue', el: '#vue',
mixins: [windowMixin], mixins: [window.windowMixin],
computed: { computed: {
endpoint: function () { endpoint: function () {
return `/lnurlp/api/v1/settings?usr=${this.g.user.id}` return `/lnurlp/api/v1/settings?usr=${this.g.user.id}`
@ -240,7 +238,7 @@ new Vue({
} }
}, },
created() { created() {
if (this.g.user.wallets.length) { if (this.g.user.wallets?.length) {
var getPayLinks = this.getPayLinks var getPayLinks = this.getPayLinks
getPayLinks() getPayLinks()
this.checker = setInterval(() => { this.checker = setInterval(() => {

View file

@ -6,11 +6,7 @@
<div class="text-center"> <div class="text-center">
<a class="text-secondary" href="lightning:{{ lnurl }}"> <a class="text-secondary" href="lightning:{{ lnurl }}">
<q-responsive :ratio="1" class="q-mx-md"> <q-responsive :ratio="1" class="q-mx-md">
<qrcode <lnbits-qrcode value="lightning:{{ lnurl }}"></lnbits-qrcode>
value="lightning:{{ lnurl }}"
:options="{width: 800}"
class="rounded-borders"
></qrcode>
</q-responsive> </q-responsive>
</a> </a>
</div> </div>
@ -44,11 +40,9 @@
</div> </div>
{% endblock %} {% block scripts %} {% endblock %} {% block scripts %}
<script> <script>
Vue.component(VueQrcode.name, VueQrcode) window.app = Vue.createApp({
new Vue({
el: '#vue', el: '#vue',
mixins: [windowMixin] mixins: [window.windowMixin]
}) })
</script> </script>
{% endblock %} {% endblock %}

View file

@ -359,12 +359,8 @@
<q-card v-if="qrCodeDialog.data" class="q-pa-lg lnbits__dialog-card"> <q-card v-if="qrCodeDialog.data" class="q-pa-lg lnbits__dialog-card">
{% raw %} {% raw %}
<q-responsive :ratio="1" class="q-mx-xl q-mb-md"> <q-responsive :ratio="1" class="q-mx-xl q-mb-md">
<qrcode <lnbits-qrcode :value="'lightning:' + qrCodeDialog.data.lnurl">
:value="'lightning:' + qrCodeDialog.data.lnurl" </lnbits-qrcode>
:options="{width: 800}"
class="rounded-borders"
>
</qrcode>
</q-responsive> </q-responsive>
<p style="word-break: break-all"> <p style="word-break: break-all">
<strong>ID:</strong> {{ qrCodeDialog.data.id }}<br /> <strong>ID:</strong> {{ qrCodeDialog.data.id }}<br />

View file

@ -1,7 +1,7 @@
{% extends "print.html" %} {% block page %} {% extends "print.html" %} {% block page %}
<div class="row justify-center"> <div class="row justify-center">
<div class="qr"> <div class="qr">
<qrcode value="lightning:{{ lnurl }}" :options="{width}"></qrcode> <lnbits-qrcode value="lightning:{{ lnurl }}"></lnbits-qrcode>
</div> </div>
</div> </div>
{% endblock %} {% block styles %} {% endblock %} {% block styles %}
@ -12,9 +12,7 @@
</style> </style>
{% endblock %} {% block scripts %} {% endblock %} {% block scripts %}
<script> <script>
Vue.component(VueQrcode.name, VueQrcode) window.app = Vue.createApp({
new Vue({
el: '#vue', el: '#vue',
created: function () { created: function () {
window.print() window.print()