From a865df6eb042bb305d2f880386fd6d9e5551ec4d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 13 Mar 2023 00:44:43 -0700 Subject: payments page formatting --- src/routes/(app)/payment/[id]/+page.svelte | 39 ++++++++++++++++++------------ 1 file changed, 24 insertions(+), 15 deletions(-) (limited to 'src/routes/(app)/payment') diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte index 2e170a43..c3f8cdf0 100644 --- a/src/routes/(app)/payment/[id]/+page.svelte +++ b/src/routes/(app)/payment/[id]/+page.svelte @@ -7,6 +7,7 @@ export let data; let { user, payment: p } = data; + let { username } = user; let { id, amount, created, rate, type, ref, tip, ourfee, fee, currency } = p; let a = Math.abs(amount); @@ -36,33 +37,41 @@ {/if} -
Amount
{f(fiat(a, rate), currency)} - {#if tip} - - + {f(fiat(tip, rate), currency)} - - {/if} - ⚡️{`${s(a)}`} - - {#if tip} - - + ⚡️{s(tip)} - - {/if} + + ⚡️{s(a)}
+ {#if tip} +
+ Tip +
+ {f(fiat(tip, rate), currency)} + + ⚡️{s(tip)} + +
+
+ +
+ Total +
+ {f(fiat(a + tip || 0, rate), currency)} + ⚡️{`${s(a + tip || 0)}`} +
+
+ {/if} +
Network fee
{f(fiat(fee, rate), currency)} - ⚡️{`${s(fee)}`} + ⚡️{`${s(fee)}`}
-- cgit v1.2.3