mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-01 20:27:45 +00:00
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:
@@ -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'}>
|
||||
|
@@ -37,7 +37,7 @@ const SendCodeAuthModal = ({
|
||||
<Skeleton
|
||||
minH="200px"
|
||||
isLoaded={!loading}
|
||||
fadeDuration={2}
|
||||
fadeDuration={1}
|
||||
display={'flex'}
|
||||
justifyContent={'center'}
|
||||
my={1}
|
||||
|
Reference in New Issue
Block a user