diff options
| author | Adam Soltys <[email protected]> | 2023-11-16 09:23:04 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-11-16 09:23:04 -0800 |
| commit | 7a215961c3b91400a6c955195a4369ff936a00c3 (patch) | |
| tree | 3d89d0fe0744252eec77c1367093fb9fa455efe2 | |
| parent | 46520607897855f02f03b53c5e4ab09c0de162d9 (diff) | |
| download | coinos-ui-7a215961c3b91400a6c955195a4369ff936a00c3.tar.gz coinos-ui-7a215961c3b91400a6c955195a4369ff936a00c3.zip | |
refresh usernames
| -rw-r--r-- | src/locales/en.json | 2 | ||||
| -rw-r--r-- | src/routes/(app)/register/+page.svelte | 20 | ||||
| -rw-r--r-- | static/icons/refresh.svg | 4 |
3 files changed, 21 insertions, 5 deletions
diff --git a/src/locales/en.json b/src/locales/en.json index 36cb3518..f10a4db7 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -121,7 +121,7 @@ "username": "Username", "password": "Password", "email": "Email", - "passwordRecommendation": "Change to a longer random password if you intend to keep significant funds in the account.", + "passwordRecommendation": "We recommend using a long, random password if you intend to keep funds in your account.", "forgotUserOrPassword": "Forgot Username or Password?", "haveAccount": "Already have an account?", "noAccount": "Don't have an account?", diff --git a/src/routes/(app)/register/+page.svelte b/src/routes/(app)/register/+page.svelte index 215c93d6..16dea024 100644 --- a/src/routes/(app)/register/+page.svelte +++ b/src/routes/(app)/register/+page.svelte @@ -16,7 +16,7 @@ export let form; export let data; - $: data && ($avatar = undefined); + $: data && ($avatar = undefined); let cleared; let clear = () => { @@ -28,9 +28,18 @@ } }; - let { index, username } = data; + let refresh = async () => { + await invalidateAll(); + await tick(); + username = data.username; + $password = data.password; + }; + + let username = data.username; $password = data.password; + let { index } = data; + afterNavigate(async () => { try { await invalidateAll(); @@ -134,7 +143,7 @@ <div class="flex justify-center items-center"> <div class="shadow-xl rounded-3xl p-4 pt-0 space-y-5 w-full mx-5 md:mx-0 md:w-[400px]"> - <inpue + <input type="file" class="hidden" bind:this={avatarInput} @@ -180,7 +189,7 @@ /> <input type="hidden" name="token" value={token} /> - <div> + <div class="relative"> <label for="username" class="font-semibold">{$t('login.username')}</label> <input name="username" @@ -191,6 +200,9 @@ on:focus={clear} autocapitalize="none" /> + <button type="button" on:click={refresh} class="absolute right-5 top-10"> + <Icon icon="refresh" style="w-6" /> + </button> </div> <div class="relative"> diff --git a/static/icons/refresh.svg b/static/icons/refresh.svg new file mode 100644 index 00000000..061c5ab1 --- /dev/null +++ b/static/icons/refresh.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools --> +<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path d="M21 12C21 16.9706 16.9706 21 12 21C9.69494 21 7.59227 20.1334 6 18.7083L3 16M3 12C3 7.02944 7.02944 3 12 3C14.3051 3 16.4077 3.86656 18 5.29168L21 8M3 21V16M3 16H8M21 3V8M21 8H16" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> +</svg>
\ No newline at end of file |
