mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-02-02 08:35:08 +08:00
Fix: Fixed the error on the login page. (#12801)
### What problem does this PR solve? Fix: Fixed the error on the login page. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -38,7 +38,7 @@ function CategorizeForm({ node }: INextOperatorForm) {
|
|||||||
<LargeModelFormField></LargeModelFormField>
|
<LargeModelFormField></LargeModelFormField>
|
||||||
</FormContainer>
|
</FormContainer>
|
||||||
<MessageHistoryWindowSizeFormField
|
<MessageHistoryWindowSizeFormField
|
||||||
min={1}
|
min={0}
|
||||||
></MessageHistoryWindowSizeFormField>
|
></MessageHistoryWindowSizeFormField>
|
||||||
<DynamicCategorize nodeId={node?.id}></DynamicCategorize>
|
<DynamicCategorize nodeId={node?.id}></DynamicCategorize>
|
||||||
<Output list={outputList}></Output>
|
<Output list={outputList}></Output>
|
||||||
|
|||||||
@ -43,8 +43,6 @@ const Login = () => {
|
|||||||
const { t } = useTranslation('translation', { keyPrefix: 'login' });
|
const { t } = useTranslation('translation', { keyPrefix: 'login' });
|
||||||
const [isLoginPage, setIsLoginPage] = useState(true);
|
const [isLoginPage, setIsLoginPage] = useState(true);
|
||||||
|
|
||||||
const [isUserInteracting, setIsUserInteracting] = useState(true);
|
|
||||||
|
|
||||||
const loading =
|
const loading =
|
||||||
signLoading ||
|
signLoading ||
|
||||||
registerLoading ||
|
registerLoading ||
|
||||||
@ -73,12 +71,11 @@ const Login = () => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setTitle(title === 'login' ? 'register' : 'login');
|
setTitle(title === 'login' ? 'register' : 'login');
|
||||||
}, 200);
|
}, 200);
|
||||||
// setTitle((title) => (title === 'login' ? 'register' : 'login'));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const FormSchema = z
|
const FormSchema = z
|
||||||
.object({
|
.object({
|
||||||
nickname: z.string().optional(),
|
nickname: z.string(),
|
||||||
email: z
|
email: z
|
||||||
.string()
|
.string()
|
||||||
.email()
|
.email()
|
||||||
@ -106,11 +103,8 @@ const Login = () => {
|
|||||||
resolver: zodResolver(FormSchema),
|
resolver: zodResolver(FormSchema),
|
||||||
});
|
});
|
||||||
|
|
||||||
const onCheck = async (params) => {
|
const onCheck = async (params: z.infer<typeof FormSchema>) => {
|
||||||
console.log('params', params);
|
|
||||||
try {
|
try {
|
||||||
// const params = await form.validateFields();
|
|
||||||
|
|
||||||
const rsaPassWord = rsaPsw(params.password) as string;
|
const rsaPassWord = rsaPsw(params.password) as string;
|
||||||
|
|
||||||
if (title === 'login') {
|
if (title === 'login') {
|
||||||
@ -154,7 +148,7 @@ const Login = () => {
|
|||||||
color={'rgb(128, 255, 248)'}
|
color={'rgb(128, 255, 248)'}
|
||||||
/>
|
/>
|
||||||
<div className=" h-[inherit] relative overflow-auto">
|
<div className=" h-[inherit] relative overflow-auto">
|
||||||
<BgSvg isPaused={isUserInteracting} />
|
<BgSvg isPaused />
|
||||||
|
|
||||||
<div className="absolute top-3 flex flex-col items-center mb-12 w-full text-text-primary">
|
<div className="absolute top-3 flex flex-col items-center mb-12 w-full text-text-primary">
|
||||||
<div className="flex items-center mb-4 w-full pl-10 pt-10 ">
|
<div className="flex items-center mb-4 w-full pl-10 pt-10 ">
|
||||||
@ -190,7 +184,7 @@ const Login = () => {
|
|||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<form
|
<form
|
||||||
className="flex flex-col gap-8 text-text-primary "
|
className="flex flex-col gap-8 text-text-primary "
|
||||||
onSubmit={form.handleSubmit((data) => onCheck(data))}
|
onSubmit={form.handleSubmit(onCheck)}
|
||||||
>
|
>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
|
|||||||
Reference in New Issue
Block a user