From 4afe6dbd6d2e6894f2d12dfcb7cd7e6c983f7517 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Tue, 18 Feb 2025 16:42:46 +0000 Subject: [PATCH] Change UI for Pay Invoice Dialog (#2979) --- lnbits/core/templates/core/wallet.html | 179 +++++++++++++++++++++---- lnbits/static/js/wallet.js | 18 ++- 2 files changed, 173 insertions(+), 24 deletions(-) diff --git a/lnbits/core/templates/core/wallet.html b/lnbits/core/templates/core/wallet.html index d7e6c887..649e11fd 100644 --- a/lnbits/core/templates/core/wallet.html +++ b/lnbits/core/templates/core/wallet.html @@ -29,19 +29,20 @@ } : ''" > -
+
-
+
-
-
- -

- - -
- - -
- - -

+
+
+

+ + +

+

+ + +

+
+
+

+
+
+ +
+
+
+ +
+
+
+
+ + +
+
+ + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{ @@ -433,15 +434,30 @@ window.WalletPageLogic = { const expireDate = new Date( (invoice.data.time_stamp + tag.value) * 1000 ) + const createdDate = new Date(invoice.data.time_stamp * 1000) cleanInvoice.expireDate = Quasar.date.formatDate( expireDate, 'YYYY-MM-DDTHH:mm:ss.SSSZ' ) + cleanInvoice.createdDate = Quasar.date.formatDate( + createdDate, + 'YYYY-MM-DDTHH:mm:ss.SSSZ' + ) + cleanInvoice.expireDateFrom = moment(expireDate).fromNow() + cleanInvoice.createdDateFrom = moment(createdDate).fromNow() + cleanInvoice.expired = false // TODO } } }) + if (this.g.wallet.currency) { + cleanInvoice.fiatAmount = LNbits.utils.formatCurrency( + ((cleanInvoice.sat / 1e8) * this.g.exchangeRate).toFixed(2), + this.g.wallet.currency + ) + } + this.parse.invoice = Object.freeze(cleanInvoice) }, payInvoice() {