Compare commits
3
Commits
dev
...
fix/qr_on_new_tab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a8f7b9b0a | ||
|
|
aee87c9aa6 | ||
|
|
6b55a65513 |
+1
-1
File diff suppressed because one or more lines are too long
@@ -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) {
|
||||||
if (this.href === '') {
|
|
||||||
this.utils.copyText(this.value)
|
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
|
if (this.href === '') {
|
||||||
|
this.utils.copyText(this.value)
|
||||||
|
return false
|
||||||
|
} else if (this.href) {
|
||||||
|
window.open(this.href, this.newTab ? '_blank' : '_self')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user