parent
4ef6eb0e20
commit
6ac01491cb
2 changed files with 51 additions and 44 deletions
@ -1,49 +1,19 @@ |
|||||||
--- |
--- |
||||||
|
import ResetPasswordForm from '../components/Profile/ResetPasswordForm'; |
||||||
import SettingLayout from '../layouts/SettingLayout.astro'; |
import SettingLayout from '../layouts/SettingLayout.astro'; |
||||||
--- |
--- |
||||||
|
|
||||||
<SettingLayout title='Reset Password'> |
<SettingLayout title='Reset Password'> |
||||||
<div class='container py-16'> |
<div class='container py-16'> |
||||||
<form class='mx-auto max-w-md'> |
<ResetPasswordForm client:load /> |
||||||
<h2 class='mb-6 text-3xl font-bold sm:text-center sm:text-4xl'> |
|
||||||
Reset your password |
|
||||||
</h2> |
|
||||||
|
|
||||||
<label |
|
||||||
for='new-password' |
|
||||||
class='text-sm leading-none text-slate-500 after:text-red-400 after:content-["*"]' |
|
||||||
> |
|
||||||
New Password |
|
||||||
</label> |
|
||||||
<input |
|
||||||
type='password' |
|
||||||
name='new-password' |
|
||||||
id='new-password' |
|
||||||
class='mt-2 mb-2 block w-full appearance-none rounded-lg border border-gray-300 px-3 py-2 shadow-sm outline-none transition duration-150 ease-in-out placeholder:text-gray-400 focus:ring-2 focus:ring-black focus:ring-offset-1' |
|
||||||
required |
|
||||||
placeholder='Enter a new password' |
|
||||||
/> |
|
||||||
|
|
||||||
<label |
|
||||||
for='new-password-confirm' |
|
||||||
class='text-sm leading-none text-slate-500 after:text-red-400 after:content-["*"]' |
|
||||||
> |
|
||||||
Confirm New Password |
|
||||||
</label> |
|
||||||
<input |
|
||||||
type='password' |
|
||||||
name='new-password-confirm' |
|
||||||
id='new-password-confirm' |
|
||||||
class='mt-2 block w-full appearance-none rounded-lg border border-gray-300 px-3 py-2 shadow-sm outline-none transition duration-150 ease-in-out placeholder:text-gray-400 focus:ring-2 focus:ring-black focus:ring-offset-1' |
|
||||||
required |
|
||||||
placeholder='Confirm your new password' |
|
||||||
/> |
|
||||||
|
|
||||||
<button |
|
||||||
type='submit' |
|
||||||
class='mt-5 inline-flex h-10 w-full items-center justify-center rounded-lg border border-slate-300 bg-black p-2 px-4 text-sm font-medium text-white outline-none transition duration-150 ease-in-out focus:ring-2 focus:ring-black focus:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-60' |
|
||||||
>Reset my password</button |
|
||||||
> |
|
||||||
</form> |
|
||||||
</div> |
</div> |
||||||
</SettingLayout> |
</SettingLayout> |
||||||
|
|
||||||
|
<script> |
||||||
|
const urlParams = new URLSearchParams(window.location.search); |
||||||
|
const code = urlParams.get('code'); |
||||||
|
|
||||||
|
if (!code) { |
||||||
|
window.location.href = '/settings/profile'; |
||||||
|
} |
||||||
|
</script> |
||||||
|
Loading…
Reference in new issue