feat: 修复Container界面和File App 和 User App

User App 添加permission
This commit is contained in:
2025-03-19 17:37:12 +08:00
parent 837457a5f7
commit 27d9bdf54e
36 changed files with 927 additions and 1349 deletions

View File

@@ -7,7 +7,18 @@ export const Button = (props: ButtonProps) => {
export const IconButton = (props: ButtonProps) => {
const { variant = 'contained', color = 'primary', sx, children, ...rest } = props;
return (
<MuiButton variant={variant} color={color} {...rest} sx={{ color: 'white', minWidth: '32px', padding: '4px', ...sx }}>
<MuiButton variant={variant} color={color} {...rest} sx={{ color: 'white', minWidth: '32px', padding: '8px', ...sx }}>
{children}
</MuiButton>
);
};
export const IconButtonItem = (props: ButtonProps) => {
const { variant = 'contained', size = 'small', color = 'primary', sx, children, ...rest } = props;
return (
<MuiButton {...props} >
{/* <MuiButton variant={'contained'} size={size} color={color} {...rest} sx={{ color: 'white', ...sx }}> */}
{children}
</MuiButton>
);

View File

@@ -0,0 +1,17 @@
import clsx from 'clsx';
import twMerge from 'tailwind-merge';
type CardBlankProps = {
number?: number;
className?: string;
};
export const CardBlank = (props: CardBlankProps) => {
const { number = 4, className } = props;
return (
<>
{new Array(number).fill(0).map((_, index) => {
return <div key={index} className={clsx('w-[300px] shark-0', className)}></div>;
})}
</>
);
};

View File

@@ -75,6 +75,12 @@ export const themeOptions: ThemeOptions = {
'&:hover': {
backgroundColor: amber[100],
},
'&.MuiButton-contained': {
color: '#ffffff',
':hover': {
color: amber[500],
},
},
},
},
},
@@ -132,6 +138,13 @@ export const themeOptions: ThemeOptions = {
},
},
},
MuiIconButton: {
styleOverrides: {
root: {
color: '#ffffff', // Set default font color to white
},
},
},
},
};
@@ -150,8 +163,8 @@ export const useTheme = () => {
/**
* 自定义主题设置。
* @param param0
* @returns
* @param param0
* @returns
*/
export const CustomThemeProvider = ({ children, themeOptions: customThemeOptions }: { children: React.ReactNode; themeOptions?: ThemeOptions }) => {
const theme = createTheme(customThemeOptions || themeOptions);

View File

@@ -1,6 +1,8 @@
@import 'tailwindcss';
@theme {
--light-color-primary: oklch(0.72 0.11 178);
--light-color-secondary: oklch(0.72 0.11 178);
}
--color-primary: #ffc107;
--color-secondary: #ffa000;
--color-success: #28a745;
--scrollbar-color: #ffc107; /* 滚动条颜色 */
}