diff options
| author | Adam Soltys <[email protected]> | 2023-02-23 15:47:31 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-23 15:47:31 -0800 |
| commit | 388f820bfc073efb4f66c1aa2394fa5a4b8a8709 (patch) | |
| tree | a8963b7192e68da76c9dbb4bfc3a958f500f464d /src/routes/(app)/payment | |
| parent | 151236882849d1e0f98ababb0ab4a41008b3f44f (diff) | |
| download | coinos-ui-388f820bfc073efb4f66c1aa2394fa5a4b8a8709.tar.gz coinos-ui-388f820bfc073efb4f66c1aa2394fa5a4b8a8709.zip | |
show tips for sender
Diffstat (limited to 'src/routes/(app)/payment')
| -rw-r--r-- | src/routes/(app)/payment/[id]/+page.svelte | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte index 2988ddb5..b8a23605 100644 --- a/src/routes/(app)/payment/[id]/+page.svelte +++ b/src/routes/(app)/payment/[id]/+page.svelte @@ -8,7 +8,7 @@ export let data; let { user, payment: p } = data; let { username } = user; - let { id, amount, created, rate, type, ref, ourfee, fee, currency } = p; + let { id, amount, created, rate, type, ref, tip, ourfee, fee, currency } = p; let a = Math.abs(amount); fee = fee || 0; @@ -26,12 +26,14 @@ {#if p.with} <div> <span class="text-lg text-secondary my-auto mr-2">{amount > 0 ? 'From' : 'To'}</span> + <a href={`/${p.with.username}`}> <div class="flex"> <div class="my-auto"> <Avatar user={p.with} size={20} /> </div> - <div class="my-auto ml-1 text-secondary">{p.with.username}</div> + <div class="my-auto ml-1">{p.with.username}</div> </div> + </a> </div> {/if} @@ -39,7 +41,19 @@ <span class="text-lg text-secondary">Amount</span> <div> {f(fiat(a, rate), currency)} - <span class="text-secondary">⚡️{`${s(a)}`}</span> + {#if tip} + <span class="text-lg"> + + {f(fiat(tip, rate), currency)} + </span> + {/if} + <span class="text-secondary">⚡️{`${s(a)}`} + + {#if tip} + <span class="text-lg"> + + ⚡️{s(tip)} + </span> + {/if} + </span> </div> </div> |
