diff options
| author | Adam Soltys <[email protected]> | 2023-02-15 22:47:36 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-15 22:47:36 -0800 |
| commit | 808d5706bf59636deb49011a00ea0f4846ea7592 (patch) | |
| tree | 7014bc17b6d0a91ad0859ab9ea6274b6f635b215 /src/routes | |
| parent | af598ffa4432706fd518c2fedd6b685f52fd1ae1 (diff) | |
| download | coinos-ui-808d5706bf59636deb49011a00ea0f4846ea7592.tar.gz coinos-ui-808d5706bf59636deb49011a00ea0f4846ea7592.zip | |
payment page
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/(app)/[username]/(profile)/+page.svelte | 1 | ||||
| -rw-r--r-- | src/routes/(app)/payment/[id]/+page.svelte | 18 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/routes/(app)/[username]/(profile)/+page.svelte b/src/routes/(app)/[username]/(profile)/+page.svelte index 7d231321..0421782c 100644 --- a/src/routes/(app)/[username]/(profile)/+page.svelte +++ b/src/routes/(app)/[username]/(profile)/+page.svelte @@ -34,7 +34,6 @@ {#if user?.id === subject.id} <div> {#if user.balance > 0} - <h1 class="text-secondary text-xl">Balance</h1> <div class="flex justify-center lg:justify-start"> <Balance {user} /> </div> diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte index 7b2bdb26..8125c63c 100644 --- a/src/routes/(app)/payment/[id]/+page.svelte +++ b/src/routes/(app)/payment/[id]/+page.svelte @@ -9,8 +9,9 @@ let { user, payment: p } = data; let { username } = user; let { id, amount, created, rate, type, ref, ourfee, fee, currency } = p; + let a = Math.abs(amount); + fee = fee || 0; - amount = Math.abs(amount); </script> <button class="ml-5 md:ml-20 mt-5 md:mt-10 hover:opacity-80" on:click={back}> @@ -23,19 +24,22 @@ </h1> {#if p.with} - <div class="flex justify-center"> - <div class="my-auto"> - <Avatar user={p.with} /> + <div> + <span class="text-lg text-secondary my-auto mr-2">{amount > 0 ? 'From' : 'To'}</span> + <div class="flex"> + <div class="my-auto"> + <Avatar user={p.with} /> + </div> + <div class="my-auto ml-1 text-secondary">{p.with.username}</div> </div> - <div class="my-auto ml-1 text-secondary">{p.with.username}</div> </div> {/if} <div> <span class="text-lg text-secondary">Amount</span> <div> - {f(fiat(amount, rate), currency)} - <span class="text-secondary">⚡️{`${s(amount)}`}</span> + {f(fiat(a, rate), currency)} + <span class="text-secondary">⚡️{`${s(a)}`}</span> </div> </div> |
