Skip to content

Commit

Permalink
fix: close cart drawer on completion
Browse files Browse the repository at this point in the history
  • Loading branch information
talvasconcelos committed Nov 20, 2024
1 parent c07cc32 commit b078108
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions static/js/tpos.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ window.app = Vue.createApp({
computed: {
amount: function () {
if (!this.stack.length) return 0.0
if (this.currency == 'sats') return Number(this.stack.join(""))
if (this.currency == 'sats') return Number(this.stack.join(''))
return (
this.stack.reduce((acc, dig) => acc * 10 + dig, 0) *
(this.currency == 'sats' ? 1 : 0.01)
Expand Down Expand Up @@ -336,7 +336,7 @@ window.app = Vue.createApp({
dialog.show = false
this.atmPin = null
this.atmToken = ''
this.complete.show = true
this.showComplete()
this.atmMode = false
this.connectionWithdraw.close()
}
Expand Down Expand Up @@ -477,7 +477,7 @@ window.app = Vue.createApp({
dialog.show = false
this.clearCart()

this.complete.show = true
this.showComplete()
}
})
}, 3000)
Expand Down Expand Up @@ -692,6 +692,12 @@ window.app = Vue.createApp({
} else {
return LNbits.utils.formatCurrency(Number(amount).toFixed(2), currency)
}
},
showComplete() {
this.complete.show = true
if (this.$q.screen.width < 1200 && this.cartDrawer) {
this.cartDrawer = false
}
}
},
created() {
Expand Down

0 comments on commit b078108

Please sign in to comment.