|  |  | @ -2,7 +2,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import { createStyles, useTheme } from 'antd-style'; |  |  |  | import { createStyles, useTheme } from 'antd-style'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import dynamic from 'next/dynamic'; |  |  |  | import dynamic from 'next/dynamic'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { PropsWithChildren, memo, useEffect, useRef } from 'react'; |  |  |  | import { PropsWithChildren, memo } from 'react'; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | import { Flexbox } from 'react-layout-kit'; |  |  |  | import { Flexbox } from 'react-layout-kit'; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import { BANNER_HEIGHT } from '@/features/AlertBanner/CloudBanner'; |  |  |  | import { BANNER_HEIGHT } from '@/features/AlertBanner/CloudBanner'; | 
			
		
	
	
		
		
			
				
					|  |  | @ -12,7 +12,7 @@ import { Divider } from "antd"; | 
			
		
	
		
		
			
				
					
					|  |  |  | import Avatar from './SideBar/Avatar'; |  |  |  | import Avatar from './SideBar/Avatar'; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | import SideBar from './SideBar'; |  |  |  | import SideBar from './SideBar'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import { useUserStore } from '@/store/user'; |  |  |  | 
 | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | const title:{[key: string]: string } = { |  |  |  | const title:{[key: string]: string } = { | 
			
		
	
		
		
			
				
					
					|  |  |  |   "/chat": '会话', |  |  |  |   "/chat": '会话', | 
			
		
	
	
		
		
			
				
					|  |  | @ -70,13 +70,6 @@ const useStyles = createStyles(({ css }) => ({ | 
			
		
	
		
		
			
				
					
					|  |  |  |   `,
 |  |  |  |   `,
 | 
			
		
	
		
		
			
				
					
					|  |  |  | })) |  |  |  | })) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | const getCookie=(name)=> { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   let matches = document.cookie.match(new RegExp( |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   )); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |   return matches ? decodeURIComponent(matches[1]) : undefined; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | const CloudBanner = dynamic(() => import('@/features/AlertBanner/CloudBanner')); |  |  |  | const CloudBanner = dynamic(() => import('@/features/AlertBanner/CloudBanner')); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | const Layout = memo<PropsWithChildren>(({ children }) => { |  |  |  | const Layout = memo<PropsWithChildren>(({ children }) => { | 
			
		
	
	
		
		
			
				
					|  |  | @ -84,15 +77,8 @@ const Layout = memo<PropsWithChildren>(({ children }) => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   const theme = useTheme(); |  |  |  |   const theme = useTheme(); | 
			
		
	
		
		
			
				
					
					|  |  |  |   const { styles, cx } = useStyles() |  |  |  |   const { styles, cx } = useStyles() | 
			
		
	
		
		
			
				
					
					|  |  |  |   const { showCloudPromotion } = useServerConfigStore(featureFlagsSelectors); |  |  |  |   const { showCloudPromotion } = useServerConfigStore(featureFlagsSelectors); | 
			
		
	
		
		
			
				
					
					|  |  |  | //   const pathName = window?.location?.pathname ?? '/welcome'
 |  |  |  |   const pathName = window?.location?.pathname ?? '/welcome' | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   // const pathName = '/welcome'
 |  |  |  |   // const pathName = '/welcome'
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   const [openSignIn] = useUserStore((s) => [s.openLogin]); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     useEffect(() => { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       const cookieValue = getCookie('organizationLogo'); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       if(!cookieValue) { |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         openSignIn(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |     }, []); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   return ( |  |  |  |   return ( | 
			
		
	
		
		
			
				
					
					|  |  |  |     <> |  |  |  |     <> | 
			
		
	
	
		
		
			
				
					|  |  | 
 |