This commit is contained in:
beabigegg
2025-09-12 08:54:21 +08:00
parent a2f024704c
commit 5ad4035e02
8 changed files with 246 additions and 364 deletions

View File

@@ -13,7 +13,6 @@ import {
IconButton,
Tooltip,
Divider,
Badge,
Chip,
} from '@mui/material';
import {
@@ -378,24 +377,26 @@ const Sidebar: React.FC<SidebarProps> = ({ collapsed, onToggleCollapse, onClose
}}
/>
{item.badge && (
<Badge
badgeContent={item.badge}
color="primary"
<Box
component="span"
sx={{
'& .MuiBadge-badge': {
backgroundColor: item.color || (actualTheme === 'dark' ? '#3b82f6' : '#1976d2'),
color: '#ffffff',
fontSize: '0.75rem',
minWidth: 20,
height: 20,
fontWeight: 600,
borderRadius: '50%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
},
ml: 1,
backgroundColor: item.color || (actualTheme === 'dark' ? '#3b82f6' : '#1976d2'),
color: '#ffffff',
fontSize: '0.75rem',
lineHeight: 1,
minWidth: 20,
height: 20,
px: 1,
fontWeight: 600,
borderRadius: 10,
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
}}
/>
>
{item.badge}
</Box>
)}
</motion.div>
)}
@@ -634,4 +635,4 @@ const Sidebar: React.FC<SidebarProps> = ({ collapsed, onToggleCollapse, onClose
);
};
export default Sidebar;
export default Sidebar;