diff options
| author | Adam Soltys <[email protected]> | 2024-11-26 22:35:28 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-26 22:35:28 -0800 |
| commit | f99bd15fabd6d7b361794f756a69d6f05a50701f (patch) | |
| tree | 9bb1b14519b34c343ad3bcd001fbd4681a53e447 /src/routes/(app) | |
| parent | f4eb6547d0db5edd0137fdefe461433500515040 (diff) | |
| download | coinos-ui-f99bd15fabd6d7b361794f756a69d6f05a50701f.tar.gz coinos-ui-f99bd15fabd6d7b361794f756a69d6f05a50701f.zip | |
warnings
Diffstat (limited to 'src/routes/(app)')
| -rw-r--r-- | src/routes/(app)/forgot/+page.server.ts | 14 | ||||
| -rw-r--r-- | src/routes/(app)/forgot/+page.svelte | 77 |
2 files changed, 0 insertions, 91 deletions
diff --git a/src/routes/(app)/forgot/+page.server.ts b/src/routes/(app)/forgot/+page.server.ts deleted file mode 100644 index 55169a5e..00000000 --- a/src/routes/(app)/forgot/+page.server.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { fail } from "@sveltejs/kit"; -import { fd, post } from "$lib/utils"; - -export const actions = { - default: async ({ request }) => { - try { - const { email } = await fd(request); - await post("/forgot", { email }); - return { success: true }; - } catch (e: any) { - return fail(400, { error: e.message }); - } - }, -}; diff --git a/src/routes/(app)/forgot/+page.svelte b/src/routes/(app)/forgot/+page.svelte deleted file mode 100644 index eb981734..00000000 --- a/src/routes/(app)/forgot/+page.svelte +++ /dev/null @@ -1,77 +0,0 @@ -<script> - import { focus } from "$lib/utils"; - import { enhance } from "$app/forms"; - import { t } from "$lib/translations"; - import Icon from "$comp/Icon.svelte"; - import Spinner from "$comp/Spinner.svelte"; - import { fly } from "svelte/transition"; - - let { form } = $props(); - let email = $state(); - let loading; -</script> - -<div class="pt-10"> - <div class="w-[243px] mx-auto mb-10"> - <a href="/"> - <Icon icon="logo" /> - </a> - </div> - - <div class="flex justify-center items-center"> - <div - class="shadow-xl rounded-3xl p-10 pb-12 space-y-5 w-full mx-5 md:mx-0 md:w-[400px]" - > - <h1 class="text-2xl font-bold text-center">{$t("login.reset")}</h1> - - {#if form?.error} - <div class="text-red-600 text-center" in:fly> - {form.error} - </div> - {/if} - - {#if form?.success} - <div class="text-secondary"> - A password reset link will be sent to your email if we have it on - file. - </div> - - <div class="flex w-full"> - <a - href="/login" - class="bg-black text-white w-full rounded-2xl p-4 font-semibold hover:opacity-80 text-center" - > - Continue - </a> - </div> - {:else} - <form class="space-y-5" method="POST" use:enhance> - <div> - <label for="email" class="font-semibold">{$t("login.email")}</label> - <input - name="email" - type="text" - required - class="bg-primary" - bind:value={email} - use:focus - autocapitalize="none" - /> - </div> - - <button - type="submit" - class="bg-black text-white w-full rounded-2xl p-4 font-semibold hover:opacity-80" - disabled={loading} - > - {#if loading} - <Spinner /> - {:else} - {$t("login.submit")} - {/if} - </button> - </form> - {/if} - </div> - </div> -</div> |
