@@ -4,6 +4,7 @@ import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { AiroButton } from '@workspace/airo-ui/components/AiroButton';
|
||||
import { Button } from '@workspace/airo-ui/components/button';
|
||||
|
||||
import { useLoginDialog } from '@/app/auth/LoginDialogContext';
|
||||
import {
|
||||
Form,
|
||||
FormControl,
|
||||
@@ -55,6 +56,7 @@ export default function RegisterForm({
|
||||
});
|
||||
|
||||
const [inviteDefault, setInviteDefault] = useState('');
|
||||
const { openLoginDialog } = useLoginDialog();
|
||||
|
||||
useEffect(() => {
|
||||
const invite = localStorage.getItem('invite') || '';
|
||||
@@ -80,7 +82,7 @@ export default function RegisterForm({
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={'h-[84px] text-2xl font-bold leading-[84px]'}>线路优化</div>
|
||||
<div className={'h-[84px] text-2xl font-bold leading-[84px] text-white'}>线路优化</div>
|
||||
|
||||
<Form {...form}>
|
||||
<form onSubmit={handleSubmit}>
|
||||
@@ -92,7 +94,9 @@ export default function RegisterForm({
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
<Input
|
||||
className={'h-[46px] rounded-full shadow-[inset_0_0_7.6px_0_#00000040]'}
|
||||
className={
|
||||
'h-[46px] rounded-full bg-white shadow-[inset_0_0_7.6px_0_#00000040]'
|
||||
}
|
||||
placeholder='电子邮箱'
|
||||
type='email'
|
||||
{...field}
|
||||
@@ -109,7 +113,9 @@ export default function RegisterForm({
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
<Input
|
||||
className={'h-[46px] rounded-full shadow-[inset_0_0_7.6px_0_#00000040]'}
|
||||
className={
|
||||
'h-[46px] rounded-full bg-white shadow-[inset_0_0_7.6px_0_#00000040]'
|
||||
}
|
||||
placeholder='设置密码'
|
||||
type='password'
|
||||
{...field}
|
||||
@@ -126,7 +132,9 @@ export default function RegisterForm({
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
<Input
|
||||
className={'h-[46px] rounded-full shadow-[inset_0_0_7.6px_0_#00000040]'}
|
||||
className={
|
||||
'h-[46px] rounded-full bg-white shadow-[inset_0_0_7.6px_0_#00000040]'
|
||||
}
|
||||
disabled={loading}
|
||||
placeholder='再次输入密码'
|
||||
type='password'
|
||||
@@ -147,7 +155,9 @@ export default function RegisterForm({
|
||||
<div className='flex items-center gap-8'>
|
||||
<Input
|
||||
disabled={loading}
|
||||
className={'h-[46px] rounded-full shadow-[inset_0_0_7.6px_0_#00000040]'}
|
||||
className={
|
||||
'h-[46px] rounded-full bg-white shadow-[inset_0_0_7.6px_0_#00000040]'
|
||||
}
|
||||
placeholder='邮箱验证码'
|
||||
type='text'
|
||||
{...field}
|
||||
@@ -175,7 +185,9 @@ export default function RegisterForm({
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
<Input
|
||||
className={'h-[46px] rounded-full shadow-[inset_0_0_7.6px_0_#00000040]'}
|
||||
className={
|
||||
'h-[46px] rounded-full bg-white shadow-[inset_0_0_7.6px_0_#00000040]'
|
||||
}
|
||||
disabled={loading || !!inviteDefault}
|
||||
placeholder={'邀请码(非必填)'}
|
||||
{...field}
|
||||
@@ -195,7 +207,7 @@ export default function RegisterForm({
|
||||
type='button'
|
||||
className='p-0 text-[#225BA9]'
|
||||
onClick={() => {
|
||||
router.replace('/');
|
||||
openLoginDialog();
|
||||
}}
|
||||
>
|
||||
登录
|
||||
@@ -204,8 +216,9 @@ export default function RegisterForm({
|
||||
<div className='mt-6 flex justify-center'>
|
||||
<AiroButton
|
||||
type='submit'
|
||||
variant={'default'}
|
||||
disabled={loading}
|
||||
className='h-auto min-w-[157px] py-2 text-lg font-medium'
|
||||
className='h-auto min-w-[157px] border-[3px] border-white bg-white/10 py-2 text-lg font-medium text-white transition hover:bg-white/25'
|
||||
>
|
||||
{loading && <Icon icon='mdi:loading' className='animate-spin' />}
|
||||
注册
|
||||
|
||||
Reference in New Issue
Block a user