This commit is contained in:
benarc 2024-02-01 17:18:55 +00:00
parent 66d44f95fb
commit 2cac36be17
12 changed files with 272 additions and 311 deletions

View file

@ -6,29 +6,23 @@
<div class="text-center">
<a class="text-secondary" href="lightning:{{ lnurl }}">
<q-responsive :ratio="1" class="q-mx-md">
<qrcode
:value="qrValue"
:options="{width: 800}"
class="rounded-borders"
></qrcode>
<qrcode :value="qrValue" :options="{width: 800}" class="rounded-borders"></qrcode>
</q-responsive>
</a>
</div>
<div class="row q-mt-lg q-gutter-sm">
<q-btn outline color="grey" @click="copyText(qrValue)"
>Copy LNURL </q-btn
>
<q-btn outline color="grey" @click="copyText(qrValue)">Copy LNURL </q-btn>
</div>
</q-card-section>
<div class="row justify-start q-mt-lg">
<div class="col col-md-auto">
<q-btn outline style="color: primmary;" @click="qrValue = '{{ lnurlpay }}'">lnurlpay</q-btn>
</div>
<div class="col col-md-auto">
<q-btn outline style="color: primmary;" @click="qrValue = '{{ lnurlwithdraw }}'">lnurlwithdraw</q-btn>
</div>
</div>
@ -40,15 +34,15 @@
<h6 class="text-subtitle1 q-mb-sm q-mt-none">Public page</h6>
<p class="q-my-none">
Moat extensions have a public page that can be shared
(this page will still be accessible even if you have restricted
(this page will still be accessible even if you have restricted
access to your LNbits install).
<br/>
<br />
In this example when a user pays the LNURLpay it triggers an event via a websocket waiting for the payment.
</p>.</p>
</q-card-section>
<q-card-section class="q-pa-none">
<q-separator></q-separator>
<q-list> </q-list>
<q-list> </q-list>
</q-card-section>
</q-card>
</div>
@ -102,34 +96,34 @@
}
frame()
},
connectWebocket(id){
//////////////////////////////////////////////////
///wait for pay action to happen and do a thing////
///////////////////////////////////////////////////
self = this
connectWebocket(id) {
//////////////////////////////////////////////////
///wait for pay action to happen and do a thing////
///////////////////////////////////////////////////
self = this
if (location.protocol !== 'http:') {
localUrl =
'wss://' +
document.domain +
':' +
location.port +
'/api/v1/ws/' +
id
} else {
localUrl =
'ws://' +
document.domain +
':' +
location.port +
'/api/v1/ws/' +
id
}
this.connection = new WebSocket(localUrl)
this.connection.onmessage = function (e) {
self.makeItRain()
}
localUrl =
'wss://' +
document.domain +
':' +
location.port +
'/api/v1/ws/' +
id
} else {
localUrl =
'ws://' +
document.domain +
':' +
location.port +
'/api/v1/ws/' +
id
}
this.connection = new WebSocket(localUrl)
this.connection.onmessage = function (e) {
self.makeItRain()
}
}
},
})
</script>
{% endblock %}
{% endblock %}