feat: add drawer and add upload feat

This commit is contained in:
2025-03-16 03:39:16 +08:00
parent fd30741151
commit cc76842582
15 changed files with 417 additions and 98 deletions

View File

@@ -0,0 +1,16 @@
import { useResourceStore } from '@/pages/store/resource';
import { useResourceFileStore } from '@/pages/store/resource-file';
import { Drawer } from '@mui/material';
export const FileDrawer = () => {
const { prefix } = useResourceStore();
const { resource, openDrawer, setOpenDrawer } = useResourceFileStore();
return (
<Drawer open={openDrawer} onClose={() => setOpenDrawer(false)} anchor='right' {...(!openDrawer && { inert: true })}>
<div className='p-4 w-[600px]'>
<h2 className='text-2xl font-bold'>{resource?.name ? resource.name.replace(prefix, '') : resource?.prefix?.replace(prefix, '')}</h2>
<pre className='flex flex-col gap-2'>{JSON.stringify(resource, null, 2)}</pre>
</div>
</Drawer>
);
};