This commit is contained in:
2025-04-03 19:29:57 +08:00
parent 521255c1af
commit 9add82dc7e
28 changed files with 749 additions and 267 deletions

View File

@@ -1,10 +1,21 @@
import clsx from 'clsx';
import { useNewNavigate } from '@/modules';
import { useTranslation } from 'react-i18next';
import { useLayoutStore } from '@/modules/layout/store';
import { useShallow } from 'zustand/shallow';
import { useMemo } from 'react';
const ServerPath = () => {
const navigate = useNewNavigate();
const { t } = useTranslation();
const layoutStore = useLayoutStore(
useShallow((state) => {
return {
isAdmin: state.isAdmin,
checkHasOrg: state.checkHasOrg,
};
}),
);
const serverPath = [
{
path: 'container',
@@ -28,9 +39,9 @@ const ServerPath = () => {
},
];
return (
<div className='p-2 w-full h-full bg-gray-200'>
<h1 className='p-4 w-1/2 m-auto h1'>{t('Site Map')}</h1>
<div className='w-1/2 m-auto bg-white p-4 border rounded-md shadow-md min-w-[700px] max-h-[80vh] overflow-auto scrollbar'>
<div className='p-2 w-full h-full bg-gray-200 '>
<h1 className='py-4 w-1/2 m-auto h1 text-primary'>{t('Site Map')}</h1>
<div className='w-1/2 m-auto bg-white p-4 border border-gray-200 rounded-md shadow-md min-w-[700px] max-h-[80vh] overflow-auto scrollbar'>
<div className='flex flex-col w-full'>
{serverPath.map((item) => {
const links = item.links.map((link) => {
@@ -54,7 +65,7 @@ const ServerPath = () => {
navigate(`/${item.path}`);
}
}}>
<div className={clsx('border rounded-md p-2 m-2', hasId && 'bg-gray-200')}>{_path}</div>
<div className={clsx('border border-gray-200 rounded-md p-2 m-2', hasId && 'bg-gray-200')}>{_path}</div>
</div>
);
});