feat: add layout and org
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
import { useMenuStore } from './store';
|
||||
import { useLayoutStore } from './store';
|
||||
import clsx from 'clsx';
|
||||
import { Button, message } from 'antd';
|
||||
import { CloseOutlined, CodeOutlined, DashboardOutlined, HomeOutlined, MessageOutlined, ReadOutlined, RocketOutlined, SmileOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
AppstoreOutlined,
|
||||
CloseOutlined,
|
||||
CodeOutlined,
|
||||
DashboardOutlined,
|
||||
FolderOutlined,
|
||||
HomeOutlined,
|
||||
MessageOutlined,
|
||||
ReadOutlined,
|
||||
RocketOutlined,
|
||||
SmileOutlined,
|
||||
SwitcherOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { useNavigate } from 'react-router';
|
||||
const meun = [
|
||||
{
|
||||
@@ -15,6 +27,16 @@ const meun = [
|
||||
icon: <DashboardOutlined />,
|
||||
link: '/panel/edit/list',
|
||||
},
|
||||
{
|
||||
title: 'User App',
|
||||
icon: <AppstoreOutlined />,
|
||||
link: '/app/edit/list',
|
||||
},
|
||||
{
|
||||
title: 'File App',
|
||||
icon: <FolderOutlined />,
|
||||
link: '/file/edit/list',
|
||||
},
|
||||
{
|
||||
title: 'Prompt',
|
||||
icon: <MessageOutlined />,
|
||||
@@ -35,13 +57,18 @@ const meun = [
|
||||
icon: <ReadOutlined />,
|
||||
link: '/chat/chat-prompt/list',
|
||||
},
|
||||
{
|
||||
title: 'Org',
|
||||
icon: <SwitcherOutlined />,
|
||||
link: '/org/edit/list',
|
||||
},
|
||||
{
|
||||
title: 'About',
|
||||
icon: <SmileOutlined />,
|
||||
},
|
||||
];
|
||||
export const LayoutMenu = () => {
|
||||
const { open, setOpen } = useMenuStore(useShallow((state) => ({ open: state.open, setOpen: state.setOpen })));
|
||||
const { open, setOpen } = useLayoutStore(useShallow((state) => ({ open: state.open, setOpen: state.setOpen })));
|
||||
const navigate = useNavigate();
|
||||
return (
|
||||
<div className={clsx('w-full h-full absolute z-20', !open && 'hidden')}>
|
||||
|
Reference in New Issue
Block a user