Simplified mobile wallet (#2175)

---------

Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
This commit is contained in:
Arc
2023-12-22 17:32:01 +01:00
committed by GitHub
co-authored by Vlad Stan Pavol Rusnak
parent 815c3e61e4
commit e8c9304519
21 changed files with 87 additions and 18 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
// update cache version every time there is a new deployment
// so the service worker reinitializes the cache
const CACHE_VERSION = 97
const CACHE_VERSION = 98
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
const getApiKey = request => {
+10
View File
@@ -242,6 +242,7 @@ new Vue({
},
balance: 0,
fiatBalance: 0,
mobileSimple: false,
credit: 0,
update: {
name: null,
@@ -271,6 +272,12 @@ new Vue({
return LNbits.utils.search(this.payments, q)
},
paymentsOmitter() {
if (this.$q.screen.lt.md && this.mobileSimple) {
return this.payments.length > 0 ? [this.payments[0]] : []
}
return this.payments
},
canPay: function () {
if (!this.parse.invoice) return false
return this.parse.invoice.sat <= this.balance
@@ -861,6 +868,9 @@ new Vue({
this.decodeRequest()
this.parse.show = true
}
if (this.$q.screen.lt.md) {
this.mobileSimple = true
}
this.fetchBalance()
this.fetchPayments()