Add relative time to invoice details
This commit is contained in:
parent
b2d8c089c9
commit
e3ffcb9e26
|
@ -30,10 +30,10 @@
|
||||||
{{ invoice.Hash }}
|
{{ invoice.Hash }}
|
||||||
</span>
|
</span>
|
||||||
<span class="mx-3 my-1">created at</span><span class="text-ellipsis overflow-hidden font-mono me-3 my-1">
|
<span class="mx-3 my-1">created at</span><span class="text-ellipsis overflow-hidden font-mono me-3 my-1">
|
||||||
{{ invoice.CreatedAt }}
|
{{ invoice.CreatedAt }} ({{ ago(new Date(invoice.CreatedAt)) }})
|
||||||
</span>
|
</span>
|
||||||
<span class="mx-3 my-1">expires at</span><span class="text-ellipsis overflow-hidden font-mono me-3 my-1">
|
<span class="mx-3 my-1">expires at</span><span class="text-ellipsis overflow-hidden font-mono me-3 my-1">
|
||||||
{{ invoice.ExpiresAt }}
|
{{ invoice.ExpiresAt }} ({{ ago(new Date(invoice.ExpiresAt)) }})
|
||||||
</span>
|
</span>
|
||||||
<span class="mx-3 my-1">sats</span><span class="text-ellipsis overflow-hidden font-mono me-3 my-1">
|
<span class="mx-3 my-1">sats</span><span class="text-ellipsis overflow-hidden font-mono me-3 my-1">
|
||||||
{{ invoice.Msats / 1000 }}
|
{{ invoice.Msats / 1000 }}
|
||||||
|
@ -60,6 +60,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onUnmounted, ref } from 'vue'
|
import { onUnmounted, ref } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
import ago from 's-ago'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
Loading…
Reference in New Issue