keep same window if desired (props.newTab)

This commit is contained in:
Tiago Vasconcelos
2026-02-25 16:28:21 +00:00
parent 6b55a65513
commit aee87c9aa6
+5 -1
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
@@ -86,7 +90,7 @@ window.app.component('lnbits-qrcode', {
this.utils.copyText(this.value) this.utils.copyText(this.value)
return false return false
} else if (this.href) { } else if (this.href) {
window.open(this.href, '_blank') window.open(this.href, this.newTab ? '_blank' : '_self')
return false return false
} }
}, },