加载页面修改

main
hongbozhou 2 months ago
parent 2376d43b67
commit 3ecb9d943e

@ -58,6 +58,7 @@
"addAi": "添加一条 AI 消息", "addAi": "添加一条 AI 消息",
"addUser": "添加一条用户消息", "addUser": "添加一条用户消息",
"more": "更多", "more": "更多",
"clear": "清空内容",
"send": "发送", "send": "发送",
"sendWithCmdEnter": "按 {{meta}} + Enter 键发送", "sendWithCmdEnter": "按 {{meta}} + Enter 键发送",
"sendWithEnter": "按 Enter 键发送", "sendWithEnter": "按 Enter 键发送",

@ -21,6 +21,7 @@
"back": "返回发现", "back": "返回发现",
"category": { "category": {
"assistant": { "assistant": {
"collect": "收藏",
"academic": "学术", "academic": "学术",
"all": "全部", "all": "全部",
"career": "职业", "career": "职业",
@ -39,6 +40,7 @@
}, },
"plugin": { "plugin": {
"all": "全部", "all": "全部",
"collect": "收藏",
"gaming-entertainment": "游戏娱乐", "gaming-entertainment": "游戏娱乐",
"life-style": "生活方式", "life-style": "生活方式",
"media-generate": "媒体生成", "media-generate": "媒体生成",

@ -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 } from 'react'; import { PropsWithChildren, memo, useEffect, useRef } 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,6 +70,13 @@ 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 }) => {
@ -77,8 +84,15 @@ 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 (
<> <>

@ -28,8 +28,8 @@ const SettingButton = memo<{ mobile?: boolean }>(({ mobile }) => {
{/* size={mobile ? MOBILE_HEADER_ICON_SIZE : DESKTOP_HEADER_ICON_SIZE}*/} {/* size={mobile ? MOBILE_HEADER_ICON_SIZE : DESKTOP_HEADER_ICON_SIZE}*/}
{/* title={t('header.session', { ns: 'setting' })}*/} {/* title={t('header.session', { ns: 'setting' })}*/}
{/*/>*/} {/*/>*/}
{/*<AgentSettings key={id} />*/}
<Button onClick={() => openChatSettings()} shape="round" style={{borderColor: '#2E62FF', color: "#2E62FF", fontSize: '13px',height: '30px' }}></Button> <Button onClick={() => openChatSettings()} shape="round" style={{borderColor: '#2E62FF', color: "#2E62FF", fontSize: '13px',height: '30px' }}></Button>
<AgentSettings key={id} />
</> </>
); );
}); });

@ -90,7 +90,7 @@ const CustomLogo = memo<LobeChatProps>(({ extra, size = 32, className, style, ty
case 'combine': { case 'combine': {
logoComponent = ( logoComponent = (
<> <>
<CustomImageLogo size={size} /> {/*<CustomImageLogo size={size} />*/}
<CustomTextLogo size={size} style={{ marginLeft: Math.round(size / 4) }} /> <CustomTextLogo size={size} style={{ marginLeft: Math.round(size / 4) }} />
</> </>
); );

@ -29,11 +29,11 @@ const InitProgress = memo<InitingProps>(({ activeStage, stages }) => {
<Progress <Progress
percent={parseInt(percent.toFixed(0))} percent={parseInt(percent.toFixed(0))}
showInfo={false} showInfo={false}
strokeColor={theme.colorPrimary} strokeColor={'#fff'}
/> />
<Flexbox align={'center'} gap={4} horizontal> <Flexbox align={'center'} gap={4} horizontal>
{stage?.icon ? stage?.icon : <Icon icon={Loader2} spin />} {stage?.icon ? stage?.icon : <Icon icon={Loader2} spin />}
<Typography.Text type={'secondary'}>{stage?.text}</Typography.Text> <Typography.Text type={'secondary'} style={{color:'#fff'}}>{stage?.text}</Typography.Text>
</Flexbox> </Flexbox>
</Center> </Center>
); );

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

@ -0,0 +1,5 @@
.bg {
background: url('./bg1.jpg') no-repeat center center;
background-size: 100% 100%;
position: relative;
}

@ -3,6 +3,7 @@ import { Center, Flexbox } from 'react-layout-kit';
import { ProductLogo } from '@/components/Branding'; import { ProductLogo } from '@/components/Branding';
import InitProgress, { StageItem } from '@/components/InitProgress'; import InitProgress, { StageItem } from '@/components/InitProgress';
import './index.css';
interface FullscreenLoadingProps { interface FullscreenLoadingProps {
activeStage: number; activeStage: number;
@ -12,8 +13,8 @@ interface FullscreenLoadingProps {
const FullscreenLoading = memo<FullscreenLoadingProps>(({ activeStage, stages, contentRender }) => { const FullscreenLoading = memo<FullscreenLoadingProps>(({ activeStage, stages, contentRender }) => {
return ( return (
<Flexbox height={'100%'} style={{ position: 'relative', userSelect: 'none' }} width={'100%'}> <Flexbox className="bg" height={'100%'} style={{ position: 'relative', userSelect: 'none' }} width={'100%'}>
<Center flex={1} gap={16} width={'100%'}> <Center flex={1} gap={16} width={'100%'} style={{ color: '#ffffff', fontSize: 15, lineHeight: 1.5, opacity: 0.66 }}>
<ProductLogo size={48} type={'combine'} /> <ProductLogo size={48} type={'combine'} />
{contentRender ? contentRender : <InitProgress activeStage={activeStage} stages={stages} />} {contentRender ? contentRender : <InitProgress activeStage={activeStage} stages={stages} />}
</Center> </Center>

@ -4,7 +4,7 @@
export const LOBE_CHAT_CLOUD = 'LobeChat Cloud'; export const LOBE_CHAT_CLOUD = 'LobeChat Cloud';
export const BRANDING_NAME = 'LobeChat'; export const BRANDING_NAME = '智能体平台';
export const BRANDING_LOGO_URL = ''; export const BRANDING_LOGO_URL = '';
export const ORG_NAME = 'LobeHub'; export const ORG_NAME = 'LobeHub';

Loading…
Cancel
Save