aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Account.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-09-06 09:32:53 -0700
committerAdam Soltys <[email protected]>2024-09-17 09:18:36 -0700
commit1b7cc6d64fb2ee3340a18d0924c4b64afabbc1e1 (patch)
tree4498405ef5555a6680b36e9628806f497ec0f561 /src/components/Account.svelte
parentc5ef18aec5de023732eb6b86f768f206462fea93 (diff)
downloadcoinos-ui-1b7cc6d64fb2ee3340a18d0924c4b64afabbc1e1.tar.gz
coinos-ui-1b7cc6d64fb2ee3340a18d0924c4b64afabbc1e1.zip
per account payment pages
Diffstat (limited to 'src/components/Account.svelte')
-rw-r--r--src/components/Account.svelte87
1 files changed, 46 insertions, 41 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>