add expiry to frontend
This commit is contained in:
parent
32448c4b0c
commit
befdeb040e
2 changed files with 11 additions and 1 deletions
|
|
@ -184,6 +184,7 @@ window.LNbits = {
|
|||
bolt11: data.bolt11,
|
||||
preimage: data.preimage,
|
||||
payment_hash: data.payment_hash,
|
||||
expiry: data.expiry,
|
||||
extra: data.extra,
|
||||
wallet_id: data.wallet_id,
|
||||
webhook: data.webhook,
|
||||
|
|
@ -195,6 +196,11 @@ window.LNbits = {
|
|||
'YYYY-MM-DD HH:mm'
|
||||
)
|
||||
obj.dateFrom = moment(obj.date).fromNow()
|
||||
obj.expirydate = Quasar.utils.date.formatDate(
|
||||
new Date(obj.expiry * 1000),
|
||||
'YYYY-MM-DD HH:mm'
|
||||
)
|
||||
obj.expirydateFrom = moment(obj.expirydate).fromNow()
|
||||
obj.msat = obj.amount
|
||||
obj.sat = obj.msat / 1000
|
||||
obj.tag = obj.extra.tag
|
||||
|
|
|
|||
|
|
@ -192,9 +192,13 @@ Vue.component('lnbits-payment-details', {
|
|||
</q-badge>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3"><b>Date</b>:</div>
|
||||
<div class="col-3"><b>Created</b>:</div>
|
||||
<div class="col-9">{{ payment.date }} ({{ payment.dateFrom }})</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3"><b>Expiry</b>:</div>
|
||||
<div class="col-9">{{ payment.expirydate }} ({{ payment.expirydateFrom }})</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3"><b>Description</b>:</div>
|
||||
<div class="col-9">{{ payment.memo }}</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue