aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorsecondl1ght <[email protected]>2022-08-24 18:46:33 -0400
committersecondl1ght <[email protected]>2022-08-24 18:46:33 -0400
commit80d2b8db2b85829ee539814c176ebcf354939ad6 (patch)
treee9353198f1d6db9a2f8f622930fe733cef15be60 /src/components
parenteeb4f8e9c4e909da916aeae6adb9699aaa765604 (diff)
downloadcoinos-ui-80d2b8db2b85829ee539814c176ebcf354939ad6.tar.gz
coinos-ui-80d2b8db2b85829ee539814c176ebcf354939ad6.zip
add email field for users
Diffstat (limited to 'src/components')
-rw-r--r--src/components/RegisterOrLogin.svelte21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/components/RegisterOrLogin.svelte b/src/components/RegisterOrLogin.svelte
index 2d1ee6a5..1c6d52e0 100644
--- a/src/components/RegisterOrLogin.svelte
+++ b/src/components/RegisterOrLogin.svelte
@@ -9,7 +9,8 @@
export let pageID;
let username = 'bob',
- password = 'pw';
+ password = 'pw',
+ email = '[email protected]';
let revealPassword = false;
@@ -33,6 +34,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">Email</label>
+ <!-- svelte-ignore a11y-autofocus -->
+ <input
+ name="email"
+ type="email"
+ required
+ class="bg-primary p-4 rounded-2xl w-full"
+ bind:value={email}
+ autofocus
+ />
+ </div>
+ {/if}
<div>
<label for="username" class="font-semibold">{$t('login.username')}</label>
<!-- svelte-ignore a11y-autofocus -->
@@ -42,7 +57,7 @@
required
class="bg-primary p-4 rounded-2xl w-full"
bind:value={username}
- autofocus
+ autofocus={pageID === 'signIn'}
/>
</div>
@@ -81,7 +96,7 @@
{:else}
<div class="flex justify-end items-center">
<a href="/forgot" class="underline underline-offset-4 text-black text-sm"
- >{$t('login.forgotPassword')}</a
+ >{$t('login.forgotUserOrPassword')}</a
>
</div>
{/if}