From bf925a332a7fde8b19f5eea677dcb0346805facd Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 3 Nov 2022 15:57:03 -0700 Subject: display tips --- src/routes/(app)/[username]/+page.svelte | 22 ++++++------- src/routes/(app)/[username]/dashboard/+page.svelte | 2 +- .../[username]/transactions/[...page]/+page.svelte | 37 +++++++++++++++------- src/routes/(app)/invoice/[id]/+page.svelte | 2 +- src/routes/(app)/invoice/[id]/paid/+page.svelte | 15 +++++++-- src/routes/(app)/send/[uuid=uuid]/+page.server.js | 3 +- src/routes/(app)/send/[uuid=uuid]/+page.svelte | 5 +-- 7 files changed, 53 insertions(+), 33 deletions(-) (limited to 'src/routes/(app)') diff --git a/src/routes/(app)/[username]/+page.svelte b/src/routes/(app)/[username]/+page.svelte index 6bab769b..a32d2238 100644 --- a/src/routes/(app)/[username]/+page.svelte +++ b/src/routes/(app)/[username]/+page.svelte @@ -44,19 +44,19 @@ {subject.address && subject.address !== 'null' ? subject.address : ''}

-
diff --git a/src/routes/(app)/[username]/dashboard/+page.svelte b/src/routes/(app)/[username]/dashboard/+page.svelte index fe685cc7..93fac986 100644 --- a/src/routes/(app)/[username]/dashboard/+page.svelte +++ b/src/routes/(app)/[username]/dashboard/+page.svelte @@ -48,7 +48,7 @@
- {sat(user.account.balance)} + {sat(user.account.balance)}
diff --git a/src/routes/(app)/[username]/transactions/[...page]/+page.svelte b/src/routes/(app)/[username]/transactions/[...page]/+page.svelte index 32c0970d..da023c3d 100644 --- a/src/routes/(app)/[username]/transactions/[...page]/+page.svelte +++ b/src/routes/(app)/[username]/transactions/[...page]/+page.svelte @@ -110,30 +110,43 @@
{#if transactions.length} {#each transactions as tx} -
-
-
{f(tx.amount * (tx.rate / sats), tx.currency)}
+
+
+
+ {f(tx.amount * (tx.rate / sats), tx.currency)} + + {#if tx.tip} + + +{f(tx.tip * (tx.rate / sats), tx.currency)} + + {/if} +
+ + {sat(tx.amount)} - {sat(tx.amount)} + {#if tx.tip} + + +{sat(tx.tip)} + + {/if} +
-
+
{#if tx.with}
-
- {tx.amount > 0 ? 'From' : 'To'} -
{tx.with.username}
- {:else} -
- {tx.amount > 0 ? 'Received' : 'Sent'} -
+ {:else} +
+ {tx.amount > 0 ? 'Received' : 'Sent'} +
{/if}
diff --git a/src/routes/(app)/invoice/[id]/+page.svelte b/src/routes/(app)/invoice/[id]/+page.svelte index f24ca590..6de55bae 100644 --- a/src/routes/(app)/invoice/[id]/+page.svelte +++ b/src/routes/(app)/invoice/[id]/+page.svelte @@ -70,7 +70,7 @@ > - +

{$t('invoice.paymentSuccessful')}

- {f(amountFiat, invoice.currency)} + {f(amountFiat, currency)} + {#if tip} + + {f(tipFiat, currency)} + {/if}

-

{sat(invoice.amount)}

+

+ {sat(amount)} + {#if tip} + +{sat(tip)} + {/if} +