diff --git a/lnbits/core/static/js/wallet.js b/lnbits/core/static/js/wallet.js index ddd3ad1cf..88181961e 100644 --- a/lnbits/core/static/js/wallet.js +++ b/lnbits/core/static/js/wallet.js @@ -1,4 +1,4 @@ -/* globals decode, Vue, VueQrcodeReader, VueQrcode, Quasar, LNbits, _, EventHub, Chart */ +/* globals moment, decode, Vue, VueQrcodeReader, VueQrcode, Quasar, LNbits, _, EventHub, Chart */ Vue.component(VueQrcode.name, VueQrcode) Vue.use(VueQrcodeReader) @@ -162,6 +162,12 @@ new Vue({ label: 'Amount (sat)', field: 'sat', sortable: true + }, + { + name: 'fee', + align: 'right', + label: 'Fee (msat)', + field: 'fee' } ], pagination: { diff --git a/lnbits/core/templates/core/wallet.html b/lnbits/core/templates/core/wallet.html index 48a812409..5d6204672 100644 --- a/lnbits/core/templates/core/wallet.html +++ b/lnbits/core/templates/core/wallet.html @@ -114,50 +114,55 @@ {{ props.row.memo }} - {{ props.row.date }} + {{ props.row.date }} + {{ props.row.dateFrom }} {{ props.row.fsat }} + + {{ props.row.fee }} + - + -
- Copy invoice - Close -
-
- -
-
+
+ + Invoice waiting to be paid + + +
+ Copy invoice + Close +
+
+
Payment Received +
Payment Sent +
-
+
Outgoing payment pending -
- Payment Hash -
- {{ props.row.payment_hash }} +
diff --git a/lnbits/static/js/base.js b/lnbits/static/js/base.js index e6c5615e5..abaec60c5 100644 --- a/lnbits/static/js/base.js +++ b/lnbits/static/js/base.js @@ -1,4 +1,4 @@ -/* globals Vue, EventHub, axios, Quasar, _ */ +/* globals moment, Vue, EventHub, axios, Quasar, _ */ var LOCALE = 'en' @@ -115,6 +115,7 @@ var LNbits = { new Date(obj.time * 1000), 'YYYY-MM-DD HH:mm' ) + obj.dateFrom = moment(obj.date).fromNow() obj.msat = obj.amount obj.sat = obj.msat / 1000 obj.tag = obj.extra.tag diff --git a/lnbits/static/js/components.js b/lnbits/static/js/components.js index 1a484d8fa..d8048e3ca 100644 --- a/lnbits/static/js/components.js +++ b/lnbits/static/js/components.js @@ -1,4 +1,4 @@ -/* global Vue, LNbits, EventHub */ +/* global Vue, moment, LNbits, EventHub */ Vue.component('lnbits-fsat', { props: { @@ -174,3 +174,31 @@ Vue.component('lnbits-extension-list', { } } }) + +Vue.component('lnbits-payment-details', { + props: ['payment'], + template: ` +
+
+
Date:
+
{{ payment.date }} ({{ payment.dateFrom }})
+
+
+
Description:
+
{{ payment.memo }}
+
+
+
Amount:
+
{{ (payment.amount / 1000).toFixed(3) }} sat
+
+
+
Fee:
+
{{ (payment.fee / 1000).toFixed(3) }} sat
+
+
+
Payment hash:
+
{{ payment.payment_hash }}
+
+
+ ` +}) diff --git a/lnbits/static/scss/base.scss b/lnbits/static/scss/base.scss index 2af63bab3..a0a8d38ce 100644 --- a/lnbits/static/scss/base.scss +++ b/lnbits/static/scss/base.scss @@ -52,6 +52,10 @@ body.body--dark .q-field--error { width: 500px; } +.lnbits__q-table__icon-td { + text-align: center; +} + .q-table--dense { th:first-child, td:first-child,