Compare commits

...
3 Commits
Author SHA1 Message Date
Tiago Vasconcelos 1a8f7b9b0a bundle 2026-02-25 16:29:36 +00:00
Tiago Vasconcelos aee87c9aa6 keep same window if desired (props.newTab) 2026-02-25 16:28:21 +00:00
Tiago Vasconcelos 6b55a65513 open qr in new tab 2026-02-25 16:28:21 +00:00
2 changed files with 10 additions and 3 deletions
File diff suppressed because one or more lines are too long
+9 -2
View File
@@ -24,6 +24,10 @@ window.app.component('lnbits-qrcode', {
type: String, type: String,
default: '' default: ''
}, },
newTab: {
type: Boolean,
default: true
},
margin: { margin: {
type: Number, type: Number,
default: 3 default: 3
@@ -80,10 +84,13 @@ window.app.component('lnbits-qrcode', {
printWindow.close() printWindow.close()
}, },
clickQrCode(event) { clickQrCode(event) {
event.preventDefault()
event.stopPropagation()
if (this.href === '') { if (this.href === '') {
this.utils.copyText(this.value) this.utils.copyText(this.value)
event.preventDefault() return false
event.stopPropagation() } else if (this.href) {
window.open(this.href, this.newTab ? '_blank' : '_self')
return false return false
} }
}, },