aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-15 15:03:47 -0700
committerAdam Soltys <[email protected]>2022-09-15 15:03:47 -0700
commit908e6e26a9b64e92bcb65461babab992c1bcc8f5 (patch)
tree11b1739ee45fd6c6c16ed8e556d5f272c660586a
parentb56a271f4d8b1f1148daec7c3bcda5469fd031c3 (diff)
downloadcoinos-ui-908e6e26a9b64e92bcb65461babab992c1bcc8f5.tar.gz
coinos-ui-908e6e26a9b64e92bcb65461babab992c1bcc8f5.zip
update dashboard page
-rw-r--r--src/components/RegisterOrLogin.svelte47
-rw-r--r--src/locales/en.json2
-rw-r--r--src/routes/[username]/dashboard/+page.svelte28
3 files changed, 41 insertions, 36 deletions
diff --git a/src/components/RegisterOrLogin.svelte b/src/components/RegisterOrLogin.svelte
index 08b5ceaa..5b1b9a95 100644
--- a/src/components/RegisterOrLogin.svelte
+++ b/src/components/RegisterOrLogin.svelte
@@ -8,9 +8,9 @@
export let pageID;
- let username = 'bob',
- password = 'pw',
- email = '[email protected]',
+ let username,
+ password,
+ email,
twofa = '';
let revealPassword = false;
@@ -35,20 +35,20 @@
<h1 class="text-2xl font-bold text-center">{$t('login.' + pageID)}</h1>
<form class="space-y-5" {action} method="POST">
- {#if pageID === 'register'}
- <div>
- <label for="email" class="font-semibold">{$t('login.email')}</label>
- <!-- svelte-ignore a11y-autofocus -->
- <input
- name="email"
- type="email"
- required
- class="bg-primary"
- bind:value={email}
- autofocus
- />
- </div>
- {/if}
+ <!-- {#if pageID === 'register'} -->
+ <!-- <div> -->
+ <!-- <label for="email" class="font-semibold">{$t('login.email')}</label> -->
+ <!-- &#60;&#33;&#45;&#45; svelte-ignore a11y-autofocus &#45;&#45;&#62; -->
+ <!-- <input -->
+ <!-- name="email" -->
+ <!-- type="email" -->
+ <!-- required -->
+ <!-- class="bg-primary" -->
+ <!-- bind:value={email} -->
+ <!-- autofocus -->
+ <!-- /> -->
+ <!-- </div> -->
+ <!-- {/if} -->
<div>
<label for="username" class="font-semibold">{$t('login.username')}</label>
<!-- svelte-ignore a11y-autofocus -->
@@ -86,7 +86,7 @@
{#if pageID === 'signIn'}
<div>
- <label for="token" class="font-semibold">{$t('login.token')}</label>
+ <label for="token" class="font-semibold">{$t('login.token')} <span class="text-secondary">({$t('login.optional')})</span></label>
<!-- svelte-ignore a11y-autofocus -->
<input
name="token"
@@ -103,11 +103,12 @@
{$t('login.passwordRecommendation')}
</p>
{:else}
- <div class="flex justify-end items-center">
- <a href="/forgot" class="underline underline-offset-4 text-black text-sm"
- >{$t('login.forgotUserOrPassword')}</a
- >
- </div>
+ <!-- TODO -->
+ <!-- <div class="flex justify-end items-center"> -->
+ <!-- <a href="/forgot" class="underline underline-offset-4 text-black text-sm" -->
+ <!-- >{$t('login.forgotUserOrPassword')}</a -->
+ <!-- > -->
+ <!-- </div> -->
{/if}
<button type="submit" class="bg-black text-white w-full rounded-2xl p-4 font-semibold"
diff --git a/src/locales/en.json b/src/locales/en.json
index d981f913..46821c54 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -107,6 +107,7 @@
}
},
"login": {
+ "optional": "Optional",
"token": "2FA Token",
"username": "Username",
"password": "Password",
@@ -140,6 +141,7 @@
"fetchingRate": "fetching rate...",
"optionalNote": "Note (Optional)",
"send": "Send",
+ "receive": "Receive a Payment",
"withdraw": "Withdraw"
},
"receive": {
diff --git a/src/routes/[username]/dashboard/+page.svelte b/src/routes/[username]/dashboard/+page.svelte
index eee13576..9c9d8908 100644
--- a/src/routes/[username]/dashboard/+page.svelte
+++ b/src/routes/[username]/dashboard/+page.svelte
@@ -49,29 +49,31 @@
{withdrawing ? 'Withdraw' : 'Dashboard'}
</h1>
{#if !withdrawing}
- <span class="text-secondary mx-auto text-lg font-bold"
- >{$t('user.dashboard.bitcoinPrice')}
- <span class="text-black"
- >{$selectedRate ? btcPrice : $t('user.dashboard.fetchingRate')}</span
- >
- </span>
-
- <span class="text-secondary block mt-1">{@html $t('user.dashboard.dataFromBinance')} </span>
-
+ <!-- <span class="text-secondary mx-auto text-lg font-bold" -->
+ <!-- >{$t('user.dashboard.bitcoinPrice')} -->
+ <!-- <span class="text-black" -->
+ <!-- >{$selectedRate ? btcPrice : $t('user.dashboard.fetchingRate')}</span -->
+ <!-- > -->
+ <!-- </span> -->
+ <!-- -->
<h3 class="text-secondary font-bold border-b pb-1 mt-10 mb-6 w-full md:w-[500px]">
{$t('user.dashboard.ACCOUNT_BALANCE')}
</h3>
<span class="text-3xl font-bold block mb-1"
- >{$selectedRate ? accountBalanceFiat : $t('user.dashboard.fetchingRate')}</span
+ >{accountBalanceSats} SAT</span
>
- <span class="text-secondary text-xl block">{accountBalanceSats} SAT</span>
+ <span class="text-secondary text-xl block">{$selectedRate ? accountBalanceFiat : $t('user.dashboard.fetchingRate')}</span>
- <button class="rounded-full border py-2 font-bold w-28 mt-4" on:click={toggle}
+ <div class="flex space-x-5">
+ <button class="rounded-full border py-2 font-bold mt-4" on:click={toggle}
+ >{$t('user.dashboard.receive')}</button
+ >
+ <button class="rounded-full border py-2 font-bold mt-4" on:click={toggle}
>{$t('user.dashboard.withdraw')}</button
>
- <p class="text-secondary my-2">{$t('user.dashboard.conversionFeeWarning')}</p>
+ </div>
{:else}
<div class="space-y-3 w-[250px] md:w-[500px] md:pr-20">
<button on:click={() => (withdrawing = false)}>