show more data in txinfo modal and fee on main table.

- also center-align icons in main table.
- and use "x time ago" instead of raw dates by default in main table
  (raw date is accessible on a tooltip, on the modal and on the CSV export).
This commit is contained in:
fiatjaf
2020-10-05 22:38:06 -03:00
parent bb965e4119
commit 16541d40c6
5 changed files with 80 additions and 38 deletions
+2 -1
View File
@@ -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
+29 -1
View File
@@ -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: `
<div class="q-py-md" style="text-align: left">
<div class="row">
<div class="col-3"><b>Date</b>:</div>
<div class="col-9">{{ payment.date }} ({{ payment.dateFrom }})</div>
</div>
<div class="row">
<div class="col-3"><b>Description</b>:</div>
<div class="col-9">{{ payment.memo }}</div>
</div>
<div class="row">
<div class="col-3"><b>Amount</b>:</div>
<div class="col-9">{{ (payment.amount / 1000).toFixed(3) }} sat</div>
</div>
<div class="row">
<div class="col-3"><b>Fee</b>:</div>
<div class="col-9">{{ (payment.fee / 1000).toFixed(3) }} sat</div>
</div>
<div class="row">
<div class="col-3"><b>Payment hash</b>:</div>
<div class="col-9 text-wrap mono">{{ payment.payment_hash }}</div>
</div>
</div>
`
})
+4
View File
@@ -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,