aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Account.svelte87
-rw-r--r--src/components/Numpad.svelte2
2 files changed, 47 insertions, 42 deletions
diff --git a/src/components/Account.svelte b/src/components/Account.svelte
index 5286c4d3..a781e809 100644
--- a/src/components/Account.svelte
+++ b/src/components/Account.svelte
@@ -4,50 +4,55 @@
import { t } from "$lib/translations";
export let user, rate, account;
- let { balance, setup, type } = account;
+ let { balance, setup, type, id } = account;
</script>
-<div class="border rounded-xl shadow p-4 space-y-5">
- <div class="flex justify-center lg:justify-start">
- <Balance {balance} {user} {rate} />
- <div class="ml-auto text-secondary">{type}</div>
- </div>
+<a href={`/${user.username}/${id}/payments`.replace(/undefined\//, "")}>
+ <div class="border rounded-xl shadow p-4 space-y-5">
+ <div class="flex justify-center lg:justify-start">
+ <Balance {balance} {user} {rate} />
+ <div class="ml-auto text-secondary">{type}</div>
+ </div>
- <div class="flex flex-wrap gap-3 justify-center w-full text-xl">
- {#if setup}
- <a href={`/send`} class="contents grow">
- <button
- type="button"
- class="rounded-2xl border py-5 px-6 font-bold hover:opacity-80 flex bg-primary grow"
- >
- <div class="mx-auto flex gap-2">
- <Icon icon="send" style="w-8" />
- <div class="my-auto">{$t("user.dashboard.send")}</div>
- </div>
- </button>
- </a>
+ <div class="flex flex-wrap gap-3 justify-center w-full text-xl">
+ {#if setup}
+ <a href={`/send`} class="contents grow">
+ <button
+ type="button"
+ class="rounded-2xl border py-5 px-6 font-bold hover:opacity-80 flex bg-primary grow"
+ >
+ <div class="mx-auto flex gap-2">
+ <Icon icon="send" style="w-8" />
+ <div class="my-auto">{$t("user.dashboard.send")}</div>
+ </div>
+ </button>
+ </a>
- <a href={`/${user.username}/receive`} class="contents">
- <button
- class="rounded-2xl border py-5 px-6 font-bold hover:opacity-80 flex bg-primary grow"
- >
- <div class="mx-auto flex gap-2">
- <Icon icon="receive" style="w-8" />
- <div class="my-auto">{$t("user.dashboard.receive")}</div>
- </div>
- </button>
- </a>
- {:else}
- <a href={`/${user.username}/account/setup`} class="contents">
- <button
- class="rounded-2xl border py-5 px-6 font-bold hover:opacity-80 flex bg-primary grow"
+ <a
+ href={`/${user.username}/${id}/receive`.replace(/undefined\//, "")}
+ class="contents"
>
- <div class="mx-auto flex gap-2">
- <Icon icon="settings" style="w-8" />
- <div class="my-auto">{$t("user.dashboard.setup")}</div>
- </div>
- </button>
- </a>
- {/if}
+ <button
+ class="rounded-2xl border py-5 px-6 font-bold hover:opacity-80 flex bg-primary grow"
+ >
+ <div class="mx-auto flex gap-2">
+ <Icon icon="receive" style="w-8" />
+ <div class="my-auto">{$t("user.dashboard.receive")}</div>
+ </div>
+ </button>
+ </a>
+ {:else}
+ <a href={`/${user.username}/account/setup`} class="contents">
+ <button
+ class="rounded-2xl border py-5 px-6 font-bold hover:opacity-80 flex bg-primary grow"
+ >
+ <div class="mx-auto flex gap-2">
+ <Icon icon="settings" style="w-8" />
+ <div class="my-auto">{$t("user.dashboard.setup")}</div>
+ </div>
+ </button>
+ </a>
+ {/if}
+ </div>
</div>
-</div>
+</a>
diff --git a/src/components/Numpad.svelte b/src/components/Numpad.svelte
index 88b5b899..78322ff5 100644
--- a/src/components/Numpad.svelte
+++ b/src/components/Numpad.svelte
@@ -1,7 +1,7 @@
<script>
import Left from "$comp/Left.svelte";
import Icon from "$comp/Icon.svelte";
- import { f, s, focus, post, warning, sat, sats } from "$lib/utils";
+ import { f, s, focus, warning, sat, sats } from "$lib/utils";
import { t } from "$lib/translations";
export let amount,