feat: add optional domain field (#120)

* feat: add optional domain field
closes #119
This commit is contained in:
dni ⚡ 2026-01-15 09:20:54 +01:00 committed by GitHub
commit 17135b45ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 107 additions and 46 deletions

View file

@ -84,6 +84,10 @@ window.PageLnurlp = {
}
},
methods: {
lnaddress(link) {
const domain = link.domain || window.location.host
return `${link.username}@${domain}`
},
mapPayLink(obj) {
const locationPath = [
window.location.protocol,
@ -140,11 +144,13 @@ window.PageLnurlp = {
(link.success_url ? ' and URL "' + link.success_url + '"' : '')
: 'do nothing',
lnurl: link.lnurl,
domain: link.domain,
pay_url: link.pay_url,
print_url: link.print_url,
username: link.username
}
this.activeUrl = window.location.origin + '/lnurlp/' + link.id
const domain = link.domain || window.location.host
this.activeUrl = `https://${domain}/lnurlp//${link.id}`
this.qrCodeDialog.show = true
},
openUpdateDialog(linkId) {