feat: change to center and clean code

This commit is contained in:
2025-02-16 02:09:14 +08:00
parent 73de223d56
commit 1363b87f36
97 changed files with 882 additions and 6775 deletions

View File

@@ -22,11 +22,6 @@ const meun = [
icon: <HomeOutlined />,
link: '/map',
},
{
title: 'Panel',
icon: <DashboardOutlined />,
link: '/panel/edit/list',
},
{
title: 'User App',
icon: <AppstoreOutlined />,
@@ -37,26 +32,11 @@ const meun = [
icon: <FolderOutlined />,
link: '/file/edit/list',
},
{
title: 'Prompt',
icon: <MessageOutlined />,
link: '/prompt',
},
{
title: 'Container',
icon: <CodeOutlined />,
link: '/container/edit/list',
},
{
title: 'Agent',
icon: <RocketOutlined />,
link: '/agent/edit/list',
},
{
title: 'Chat Prompt',
icon: <ReadOutlined />,
link: '/chat/chat-prompt/list',
},
{
title: 'Org',
icon: <SwitcherOutlined />,
@@ -79,7 +59,7 @@ export const LayoutMenu = () => {
}}></div>
<div className='w-[300px] h-full absolute top-0 left-0 bg-white'>
<div className='flex justify-between p-6 mt-4 font-bold items-center'>
Envision
Envision Center
<div>
<Button icon={<CloseOutlined />} onClick={() => setOpen(false)}></Button>
</div>
@@ -93,7 +73,7 @@ export const LayoutMenu = () => {
onClick={() => {
if (item.link) navigate(`${item.link}`);
else {
message.info('About Envision');
message.info('About Envision Center');
}
setOpen(false);
}}>

View File

@@ -1,4 +1,3 @@
import { AiMoudle, useAiStore } from '@/pages/ai-chat';
import { MenuOutlined, SwapOutlined } from '@ant-design/icons';
import { Button, Tooltip } from 'antd';
import { Outlet } from 'react-router-dom';
@@ -39,11 +38,7 @@ export const LayoutMain = (props: LayoutMainProps) => {
}),
);
const { isMac, mount, isElectron } = platformStore;
const aiStore = useAiStore(
useShallow((state) => {
return { open: state.open };
}),
);
useLayoutEffect(() => {
platformStore.init();
}, []);
@@ -106,12 +101,10 @@ export const LayoutMain = (props: LayoutMainProps) => {
</div>
</Panel>
<PanelResizeHandle />
<Panel style={{ height: '100%' }} defaultSize={25} className={clsx(!aiStore.open && 'hidden')}>
<div className='w-full h-full'>
<AiMoudle />
</div>
</Panel>
{/* <PanelResizeHandle />
<Panel style={{ height: '100%' }} defaultSize={25} className={clsx('bg-gray-100')}>
侧边栏
</Panel> */}
</PanelGroup>
</div>
<LayoutUser />