mirror of
https://github.com/lnbits/lnbits.git
synced 2025-10-08 19:50:10 +02:00
Fix/hotfix custom design (#850)
* allow to toggle custom desing on and off * make custom design off by default, toggle custom design
This commit is contained in:
committed by
GitHub
parent
b83fb1d5d8
commit
af8af54376
@@ -70,7 +70,7 @@ new Vue({
|
|||||||
show: false,
|
show: false,
|
||||||
data: {
|
data: {
|
||||||
is_unique: true,
|
is_unique: true,
|
||||||
use_custom: true,
|
use_custom: false,
|
||||||
title: 'Vouchers',
|
title: 'Vouchers',
|
||||||
min_withdrawable: 0,
|
min_withdrawable: 0,
|
||||||
wait_time: 1
|
wait_time: 1
|
||||||
@@ -125,7 +125,6 @@ new Vue({
|
|||||||
var link = _.findWhere(this.withdrawLinks, {id: linkId})
|
var link = _.findWhere(this.withdrawLinks, {id: linkId})
|
||||||
|
|
||||||
this.qrCodeDialog.data = _.clone(link)
|
this.qrCodeDialog.data = _.clone(link)
|
||||||
console.log(this.qrCodeDialog.data)
|
|
||||||
this.qrCodeDialog.data.url =
|
this.qrCodeDialog.data.url =
|
||||||
window.location.protocol + '//' + window.location.host
|
window.location.protocol + '//' + window.location.host
|
||||||
this.qrCodeDialog.show = true
|
this.qrCodeDialog.show = true
|
||||||
@@ -140,6 +139,11 @@ new Vue({
|
|||||||
id: this.formDialog.data.wallet
|
id: this.formDialog.data.wallet
|
||||||
})
|
})
|
||||||
var data = _.omit(this.formDialog.data, 'wallet')
|
var data = _.omit(this.formDialog.data, 'wallet')
|
||||||
|
|
||||||
|
if (!data.use_custom) {
|
||||||
|
data.custom_url = null
|
||||||
|
}
|
||||||
|
|
||||||
if (data.use_custom && !data?.custom_url) {
|
if (data.use_custom && !data?.custom_url) {
|
||||||
data.custom_url = CUSTOM_URL
|
data.custom_url = CUSTOM_URL
|
||||||
}
|
}
|
||||||
@@ -168,6 +172,10 @@ new Vue({
|
|||||||
data.title = 'vouchers'
|
data.title = 'vouchers'
|
||||||
data.is_unique = true
|
data.is_unique = true
|
||||||
|
|
||||||
|
if (!data.use_custom) {
|
||||||
|
data.custom_url = null
|
||||||
|
}
|
||||||
|
|
||||||
if (data.use_custom && !data?.custom_url) {
|
if (data.use_custom && !data?.custom_url) {
|
||||||
data.custom_url = '/static/images/default_voucher.png'
|
data.custom_url = '/static/images/default_voucher.png'
|
||||||
}
|
}
|
||||||
|
@@ -241,7 +241,7 @@
|
|||||||
v-model="formDialog.data.custom_url"
|
v-model="formDialog.data.custom_url"
|
||||||
type="text"
|
type="text"
|
||||||
label="Custom design .png (optional)"
|
label="Custom design .png (optional)"
|
||||||
hint="Enter a URL if you want to use a custom design or leave blank for showing only the QR"
|
hint="Enter a URL if you want to use a custom design or leave blank for LNbits designed vouchers!"
|
||||||
></q-input>
|
></q-input>
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item tag="label" class="rounded-borders">
|
<q-item tag="label" class="rounded-borders">
|
||||||
@@ -353,7 +353,7 @@
|
|||||||
v-model="simpleformDialog.data.custom_url"
|
v-model="simpleformDialog.data.custom_url"
|
||||||
type="text"
|
type="text"
|
||||||
label="Custom design .png (optional)"
|
label="Custom design .png (optional)"
|
||||||
hint="Enter a URL if you want to use a custom design or leave blank for showing only the QR"
|
hint="Enter a URL if you want to use a custom design or leave blank for LNbits designed vouchers!"
|
||||||
></q-input>
|
></q-input>
|
||||||
|
|
||||||
<div class="row q-mt-lg">
|
<div class="row q-mt-lg">
|
||||||
|
Reference in New Issue
Block a user