fix: g.wallet artifacts in lnbits-payment-list and lnbits-manage-wall... (#3601)
This commit is contained in:
parent
6449276003
commit
ad8b70a098
4 changed files with 21 additions and 20 deletions
2
lnbits/static/bundle-components.min.js
vendored
2
lnbits/static/bundle-components.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -3,7 +3,16 @@ window.app.component('lnbits-manage-wallet-list', {
|
|||
mixins: [window.windowMixin],
|
||||
data() {
|
||||
return {
|
||||
walletName: ''
|
||||
activeWalletId: null
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route(to) {
|
||||
if (to.path.startsWith('/wallet/')) {
|
||||
this.activeWalletId = to.params.id
|
||||
} else {
|
||||
this.activeWalletId = null
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ window.app.component('lnbits-payment-list', {
|
|||
},
|
||||
checkPayment(payment_hash) {
|
||||
LNbits.api
|
||||
.getPayment(this.g.wallet, payment_hash)
|
||||
.getPayment(this.wallet, payment_hash)
|
||||
.then(res => {
|
||||
this.update = !this.update
|
||||
if (res.data.status == 'success') {
|
||||
|
|
@ -319,7 +319,7 @@ window.app.component('lnbits-payment-list', {
|
|||
},
|
||||
cancelHoldInvoice(payment_hash) {
|
||||
LNbits.api
|
||||
.cancelInvoice(this.g.wallet, payment_hash)
|
||||
.cancelInvoice(this.wallet, payment_hash)
|
||||
.then(() => {
|
||||
this.update = !this.update
|
||||
Quasar.Notify.create({
|
||||
|
|
@ -331,7 +331,7 @@ window.app.component('lnbits-payment-list', {
|
|||
},
|
||||
settleHoldInvoice(preimage) {
|
||||
LNbits.api
|
||||
.settleInvoice(this.g.wallet, preimage)
|
||||
.settleInvoice(this.wallet, preimage)
|
||||
.then(() => {
|
||||
this.update = !this.update
|
||||
Quasar.Notify.create({
|
||||
|
|
@ -354,7 +354,7 @@ window.app.component('lnbits-payment-list', {
|
|||
direction: pagination.descending ? 'desc' : 'asc'
|
||||
}
|
||||
const params = new URLSearchParams(query)
|
||||
LNbits.api.getPayments(this.g.wallet, params).then(response => {
|
||||
LNbits.api.getPayments(this.wallet, params).then(response => {
|
||||
let payments = response.data.data.map(this.mapPayment)
|
||||
let columns = this.paymentsCSV.columns
|
||||
|
||||
|
|
@ -382,7 +382,7 @@ window.app.component('lnbits-payment-list', {
|
|||
LNbits.utils.exportCSV(
|
||||
columns,
|
||||
payments,
|
||||
this.g.wallet.name + '-payments'
|
||||
this.wallet.name + '-payments'
|
||||
)
|
||||
})
|
||||
},
|
||||
|
|
@ -451,7 +451,7 @@ window.app.component('lnbits-payment-list', {
|
|||
await LNbits.api.request(
|
||||
'PUT',
|
||||
`/api/v1/payments/${this.selectedPayment.payment_hash}/labels`,
|
||||
this.g.wallet.adminkey,
|
||||
this.wallet.adminkey,
|
||||
{
|
||||
labels: labels
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,24 +11,16 @@
|
|||
)"
|
||||
:key="walletRec.id"
|
||||
clickable
|
||||
:active="g.wallet && g.wallet.id === walletRec.id"
|
||||
:active="walletRec.id === activeWalletId"
|
||||
@click="$router.push('/wallet/' + walletRec.id)"
|
||||
>
|
||||
<q-item-section side>
|
||||
<q-avatar
|
||||
size="lg"
|
||||
:text-color="$q.dark.isActive ? 'black' : 'grey-3'"
|
||||
:class="g.wallet && g.wallet.id === walletRec.id ? '' : 'disabled'"
|
||||
:color="
|
||||
g.wallet && g.wallet.id === walletRec.id
|
||||
? walletRec.extra.color
|
||||
: walletRec.extra.color
|
||||
"
|
||||
:icon="
|
||||
g.wallet && g.wallet.id === walletRec.id
|
||||
? walletRec.extra.icon
|
||||
: walletRec.extra.icon
|
||||
"
|
||||
:disabled="walletRec.id === activeWalletId"
|
||||
:color="walletRec.extra.color"
|
||||
:icon="walletRec.extra.icon"
|
||||
>
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue