Compare commits
6
Commits
0.12.6-rc1
...
0.12.6-rc3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05a244d8fd | ||
|
|
019995078c | ||
|
|
f37cb6481c | ||
|
|
365f9a3923 | ||
|
|
bb4dd4fe35 | ||
|
|
d1ae531750 |
@@ -105,7 +105,7 @@
|
|||||||
<payment-list
|
<payment-list
|
||||||
:update="updatePayments"
|
:update="updatePayments"
|
||||||
:wallet="this.g.wallet"
|
:wallet="this.g.wallet"
|
||||||
:mobileSimple="mobileSimple"
|
:mobile-simple="mobileSimple"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{% if HIDE_API %}
|
{% if HIDE_API %}
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -77,6 +77,30 @@ new Vue({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
addAdminUser() {
|
||||||
|
let addUser = this.formAddAdmin
|
||||||
|
let admin_users = this.formData.lnbits_admin_users
|
||||||
|
if (addUser && addUser.length && !admin_users.includes(addUser)) {
|
||||||
|
this.formData.lnbits_admin_users = [...admin_users, addUser]
|
||||||
|
this.formAddAdmin = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removeAdminUser(user) {
|
||||||
|
let admin_users = this.formData.lnbits_admin_users
|
||||||
|
this.formData.lnbits_admin_users = admin_users.filter(u => u !== user)
|
||||||
|
},
|
||||||
|
addAllowedUser() {
|
||||||
|
let addUser = this.formAddUser
|
||||||
|
let allowed_users = this.formData.lnbits_allowed_users
|
||||||
|
if (addUser && addUser.length && !allowed_users.includes(addUser)) {
|
||||||
|
this.formData.lnbits_allowed_users = [...allowed_users, addUser]
|
||||||
|
this.formAddUser = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removeAllowedUser(user) {
|
||||||
|
let allowed_users = this.formData.lnbits_allowed_users
|
||||||
|
this.formData.lnbits_allowed_users = allowed_users.filter(u => u !== user)
|
||||||
|
},
|
||||||
addExtensionsManifest() {
|
addExtensionsManifest() {
|
||||||
const addManifest = this.formAddExtensionsManifest.trim()
|
const addManifest = this.formAddExtensionsManifest.trim()
|
||||||
const manifests = this.formData.lnbits_extensions_manifests
|
const manifests = this.formData.lnbits_extensions_manifests
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ function generateChart(canvas, rawData) {
|
|||||||
Vue.component('payment-chart', {
|
Vue.component('payment-chart', {
|
||||||
name: 'payment-chart',
|
name: 'payment-chart',
|
||||||
props: ['wallet'],
|
props: ['wallet'],
|
||||||
|
mixins: [windowMixin],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
paymentsChart: {
|
paymentsChart: {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Vue.component('payment-list', {
|
Vue.component('payment-list', {
|
||||||
name: 'payment-list',
|
name: 'payment-list',
|
||||||
props: ['update', 'wallet', 'mobileSimple', 'lazy'],
|
props: ['update', 'wallet', 'mobileSimple', 'lazy'],
|
||||||
|
mixins: [windowMixin],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
denomination: LNBITS_DENOMINATION,
|
denomination: LNBITS_DENOMINATION,
|
||||||
@@ -164,11 +165,11 @@ Vue.component('payment-list', {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
formatCurrency: function (currency, amount) {
|
formatCurrency: function (amount, currency) {
|
||||||
try {
|
try {
|
||||||
return LNbits.utils.formatCurrency(currency, amount)
|
return LNbits.utils.formatCurrency(amount, currency)
|
||||||
} catch (error) {
|
} catch (e) {
|
||||||
console.warn(error)
|
console.error(e)
|
||||||
return `${amount} ???`
|
return `${amount} ???`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -295,22 +296,22 @@ Vue.component('payment-list', {
|
|||||||
key="amount"
|
key="amount"
|
||||||
v-if="denomination != 'sats'"
|
v-if="denomination != 'sats'"
|
||||||
:props="props"
|
:props="props"
|
||||||
class="lol1"
|
class="col1"
|
||||||
v-text="parseFloat(String(props.row.fsat).replaceAll(',', '')) / 100"
|
v-text="parseFloat(String(props.row.fsat).replaceAll(',', '')) / 100"
|
||||||
>
|
>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td class="lol2" auto-width key="amount" v-else :props="props">
|
<q-td class="col2" auto-width key="amount" v-else :props="props">
|
||||||
<span v-text="props.row.fsat"></span>
|
<span v-text="props.row.fsat"></span>
|
||||||
<br />
|
<br />
|
||||||
<i v-if="props.row.extra.wallet_fiat_currency">
|
<i v-if="props.row.extra.wallet_fiat_currency">
|
||||||
<span
|
<span
|
||||||
v-text="formatCurrency(props.row.extra.wallet_fiat_currency, props.row.extra.wallet_fiat_amount)"
|
v-text="formatCurrency(props.row.extra.wallet_fiat_amount, props.row.extra.wallet_fiat_currency)"
|
||||||
></span>
|
></span>
|
||||||
<br />
|
<br />
|
||||||
</i>
|
</i>
|
||||||
<i v-if="props.row.extra.fiat_currency">
|
<i v-if="props.row.extra.fiat_currency">
|
||||||
<span
|
<span
|
||||||
v-text="formatCurrency(props.row.extra.fiat_currency, props.row.extra.fiat_amount)"
|
v-text="formatCurrency(props.row.extra.fiat_amount, props.row.extra.fiat_currency)"
|
||||||
></span>
|
></span>
|
||||||
</i>
|
</i>
|
||||||
</q-td>
|
</q-td>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ new Vue({
|
|||||||
show: false,
|
show: false,
|
||||||
location: window.location
|
location: window.location
|
||||||
},
|
},
|
||||||
balance: 0,
|
balance: parseInt(wallet.balance_msat / 1000),
|
||||||
fiatBalance: 0,
|
fiatBalance: 0,
|
||||||
mobileSimple: false,
|
mobileSimple: false,
|
||||||
credit: 0,
|
credit: 0,
|
||||||
@@ -349,9 +349,10 @@ new Vue({
|
|||||||
.getPayment(this.g.wallet, response.data.payment_hash)
|
.getPayment(this.g.wallet, response.data.payment_hash)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.data.paid) {
|
if (res.data.paid) {
|
||||||
this.parse.show = false
|
|
||||||
clearInterval(this.parse.paymentChecker)
|
|
||||||
dismissPaymentMsg()
|
dismissPaymentMsg()
|
||||||
|
clearInterval(this.parse.paymentChecker)
|
||||||
|
this.updatePayments = !this.updatePayments
|
||||||
|
this.parse.show = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 2000)
|
}, 2000)
|
||||||
@@ -359,6 +360,8 @@ new Vue({
|
|||||||
.catch(err => {
|
.catch(err => {
|
||||||
dismissPaymentMsg()
|
dismissPaymentMsg()
|
||||||
LNbits.utils.notifyApiError(err)
|
LNbits.utils.notifyApiError(err)
|
||||||
|
this.updatePayments = !this.updatePayments
|
||||||
|
this.parse.show = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
payLnurl: function () {
|
payLnurl: function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user