🐛 fix(ui): Bugs
This commit is contained in:
@@ -36,10 +36,10 @@ export default function Page() {
|
||||
<div className='flex flex-col justify-center pb-14 lg:flex-auto lg:pb-20'>
|
||||
<UserAuthForm />
|
||||
</div>
|
||||
<div className='flex items-center justify-between'>
|
||||
<div className='text-primary flex gap-5 text-sm font-semibold'>
|
||||
<div className='flex items-center justify-end'>
|
||||
{/* <div className='text-primary flex gap-5 text-sm font-semibold'>
|
||||
<Link href='/tos'>{t('tos')}</Link>
|
||||
</div>
|
||||
</div> */}
|
||||
<div className='flex items-center gap-5'>
|
||||
<LanguageSwitch />
|
||||
<ThemeSwitch />
|
||||
|
||||
@@ -7,10 +7,7 @@ import {
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { checkUser, resetPassword, userLogin, userRegister } from '@/services/common/auth';
|
||||
import { getRedirectUrl, setAuthorization } from '@/utils/common';
|
||||
import { Icon } from '@iconify/react';
|
||||
import { Button } from '@shadcn/ui/button';
|
||||
import { toast } from '@shadcn/ui/lib/sonner';
|
||||
import { cn } from '@shadcn/ui/lib/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { ReactNode, useState, useTransition } from 'react';
|
||||
@@ -131,7 +128,7 @@ export default function UserAuthForm() {
|
||||
{t(`${type || 'check'}.description`)}
|
||||
</div>
|
||||
</div>
|
||||
{!((type === 'register' && register.stop_register) || type === 'reset') && (
|
||||
{/* {!((type === 'register' && register.stop_register) || type === 'reset') && (
|
||||
<>
|
||||
<div className='mb-3 flex flex-wrap items-center justify-center gap-3 font-bold'>
|
||||
<Button type='button' variant='outline'>
|
||||
@@ -157,7 +154,7 @@ export default function UserAuthForm() {
|
||||
<span className='text-muted-foreground w-[125px] text-sm'>{t('orWithEmail')}</span>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
)} */}
|
||||
|
||||
{UserForm}
|
||||
</>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { Icon } from '@iconify/react';
|
||||
import { Button } from '@shadcn/ui/button';
|
||||
import { Form, FormControl, FormField, FormItem, FormMessage } from '@shadcn/ui/form';
|
||||
@@ -18,22 +17,20 @@ export default function UserCheckForm({
|
||||
initialValues: any;
|
||||
}) {
|
||||
const t = useTranslations('auth.check');
|
||||
const { common } = useGlobalStore();
|
||||
const { register } = common;
|
||||
// const { common } = useGlobalStore();
|
||||
// const { register } = common;
|
||||
const formSchema = z.object({
|
||||
email: z
|
||||
.string()
|
||||
.email(t('email'))
|
||||
.refine(
|
||||
(email) => {
|
||||
if (!register.enable_email_domain_suffix) return true;
|
||||
const domain = email.split('@')[1] as string;
|
||||
return register.email_domain_suffix_list.split('\n').includes(domain);
|
||||
},
|
||||
{
|
||||
message: t('whitelist'),
|
||||
},
|
||||
),
|
||||
email: z.string().email(t('email')),
|
||||
// .refine(
|
||||
// (email) => {
|
||||
// if (!register.enable_email_domain_suffix) return true;
|
||||
// const domain = email.split('@')[1] as string;
|
||||
// return register.email_domain_suffix_list.split('\n').includes(domain);
|
||||
// },
|
||||
// {
|
||||
// message: t('whitelist'),
|
||||
// },
|
||||
// ),
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
|
||||
@@ -491,7 +491,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className='grid grid-cols-2 gap-4'>
|
||||
<div className='flex flex-col gap-4'>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name='server_group'
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"smtpAccount": "SMTP Account",
|
||||
"smtpAccountDescription": "The email account used for authentication.",
|
||||
"smtpEncryptionMethod": "SMTP Encryption Method",
|
||||
"smtpEncryptionMethodDescription": "Choose whether to enable SSL encryption.",
|
||||
"smtpEncryptionMethodDescription": "Choose whether to enable SSL/TLS encryption.",
|
||||
"smtpPassword": "SMTP Password",
|
||||
"smtpPasswordDescription": "The password for the SMTP account.",
|
||||
"smtpServerAddress": "SMTP Server Address",
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"smtpAccount": "SMTP 账号",
|
||||
"smtpAccountDescription": "用于身份验证的邮件账号。",
|
||||
"smtpEncryptionMethod": "SMTP 加密方式",
|
||||
"smtpEncryptionMethodDescription": "选择是否启用 SSL 加密。",
|
||||
"smtpEncryptionMethodDescription": "选择是否启用 SSL/TLS 加密。",
|
||||
"smtpPassword": "SMTP 密码",
|
||||
"smtpPasswordDescription": "该 SMTP 账号的密码。",
|
||||
"smtpServerAddress": "SMTP 服务器地址",
|
||||
|
||||
Reference in New Issue
Block a user