Perf: i18n change and captcha code. (#2625)

* perf: send captcha check

* perf: back router

* perf: i18n init

* perf: ui

* i18n

* perf: ui duration
This commit is contained in:
Archer
2024-09-05 23:01:12 +08:00
committed by GitHub
parent 478386c612
commit c614f8b9ca
43 changed files with 259 additions and 793 deletions

View File

@@ -7,9 +7,11 @@ import { useQuery } from '@tanstack/react-query';
import { useUserStore } from '@/web/support/user/useUserStore';
import { getUnreadCount } from '@/web/support/user/inform/api';
import dynamic from 'next/dynamic';
import { useI18nLng } from '@fastgpt/web/hooks/useI18n';
import Auth from './auth';
import { useSystem } from '@fastgpt/web/hooks/useSystem';
import { useMount } from 'ahooks';
const Navbar = dynamic(() => import('./navbar'));
const NavbarPhone = dynamic(() => import('./navbarPhone'));
const UpdateInviteModal = dynamic(() => import('@/components/support/user/team/UpdateInviteModal'));
@@ -46,6 +48,7 @@ const Layout = ({ children }: { children: JSX.Element }) => {
const { loading, feConfigs, isNotSufficientModal } = useSystemStore();
const { isPc } = useSystem();
const { userInfo } = useUserStore();
const { setUserDefaultLng } = useI18nLng();
const isChatPage = useMemo(
() => router.pathname === '/chat' && Object.values(router.query).join('').length !== 0,
@@ -61,6 +64,10 @@ const Layout = ({ children }: { children: JSX.Element }) => {
const isHideNavbar = !!pcUnShowLayoutRoute[router.pathname];
useMount(() => {
setUserDefaultLng();
});
return (
<>
<Box h={'100%'} bg={'myGray.100'}>

View File

@@ -37,7 +37,7 @@ const SendCodeAuthModal = ({
<Skeleton
minH="200px"
isLoaded={!loading}
fadeDuration={2}
fadeDuration={1}
display={'flex'}
justifyContent={'center'}
my={1}