aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/routes/(app)/[username]/(profile)/+page.svelte1
-rw-r--r--src/routes/(app)/payment/[id]/+page.svelte18
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>