From 3c0489e1cca4f6a211215b700489d256695c3ce1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 24 Dec 2024 00:41:51 -0800 Subject: create fund --- src/components/Lnurlw.svelte | 6 +-- src/components/Payments.svelte | 120 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 123 insertions(+), 3 deletions(-) create mode 100644 src/components/Payments.svelte (limited to 'src/components') diff --git a/src/components/Lnurlw.svelte b/src/components/Lnurlw.svelte index e3345d31..8793d3b4 100644 --- a/src/components/Lnurlw.svelte +++ b/src/components/Lnurlw.svelte @@ -55,7 +55,7 @@ {/if} -
+ @@ -65,11 +65,11 @@
-
diff --git a/src/components/Payments.svelte b/src/components/Payments.svelte new file mode 100644 index 00000000..2d38513e --- /dev/null +++ b/src/components/Payments.svelte @@ -0,0 +1,120 @@ + + +
+ {#each payments as p, i} + {@const amount = fund ? -p.amount : p.amount} +
goto(`/payment/${p.id}`)} + > +
+
+
+ +
{s(Math.abs(amount), locale)}
+
+
+ +
+ {f(Math.abs(amount) * (p.rate / sats), p.currency, locale)} + + {#if p.tip} + +  +{Math.round((p.tip / Math.abs(amount)) * 100)}% + + {/if} +
+
+ +
+ {#if p.type === types.fund} + {#if fund} +
+
+ +
+
+ {p.user.username} +
+
+ {:else} + +
+ + +
{$t("payments.fund")}
+
+
+ {/if} + {:else if p.with} +
+
+ +
+
+ {p.with.username} +
+
+ {:else} +
+ {#if p.type === types.lightning} + + {:else if p.type === types.ecash} + + {:else if p.type === types.reconcile} + + {:else if p.type === types.bitcoin} + + {:else if p.type === types.liquid} +
+ Liquid +
+ {/if} + +
+ {amount > 0 ? (p.confirmed ? "Received" : "Pending") : "Sent"} +
+
+ {/if} +
+ +
+
+ {format(new Date(p.created), "h:mm aaa", { locale })} +
+
+ {format(new Date(p.created), "MMM d, yy", { locale })} +
+
+
+ {:else} +

{$t("payments.empty")}

+ {/each} +
-- cgit v1.2.3