mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: ♻️ Rewrite password reset page, polish auth
This commit is contained in:
parent
7cd71f252e
commit
f672ce5a69
12 changed files with 205 additions and 105 deletions
|
|
@ -43,10 +43,6 @@ const form = useForm({
|
|||
validationSchema: formSchema,
|
||||
});
|
||||
|
||||
const onSubmit = form.handleSubmit((values) => {
|
||||
console.info("Form submitted!", values);
|
||||
});
|
||||
|
||||
const redirectUrl = new URL("/api/auth/login", `https://${instance.domain}`);
|
||||
|
||||
const params = useUrlSearchParams();
|
||||
|
|
@ -85,7 +81,7 @@ const issuerRedirectUrl = (issuerId: string) => {
|
|||
|
||||
<template>
|
||||
<div class="grid gap-6">
|
||||
<form @submit="onSubmit" method="post" :action="redirectUrl.toString()">
|
||||
<form @submit="form.submitForm" method="post" :action="redirectUrl.toString()">
|
||||
<div class="grid gap-6">
|
||||
<FormField v-slot="{ componentField }" name="identifier">
|
||||
<FormItem>
|
||||
|
|
@ -93,7 +89,7 @@ const issuerRedirectUrl = (issuerId: string) => {
|
|||
Email (or username)
|
||||
</FormLabel>
|
||||
<FormControl>
|
||||
<Input placeholder="petergriffin" type="email" auto-capitalize="none"
|
||||
<Input placeholder="petergriffin" type="text" auto-capitalize="none"
|
||||
auto-complete="idenfifier" auto-correct="off" :disabled="isLoading"
|
||||
v-bind="componentField" />
|
||||
</FormControl>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue