fix: pm link

This commit is contained in:
katherinehhh 2024-02-04 14:20:14 +08:00
parent 4182140f13
commit e05178b7af

View File

@ -53,51 +53,53 @@ export const SettingsCenterDropdown = () => {
`} `}
style={{ boxShadow: 'none' }} style={{ boxShadow: 'none' }}
> >
{settings.map((setting) => ( {settings
<Card.Grid .filter((v) => v.isTopLevel !== false)
style={{ .map((setting) => (
width: settings.length === 1 ? '100%' : settings.length === 2 ? '50%' : '33.33%', <Card.Grid
}} style={{
className={css` width: settings.length === 1 ? '100%' : settings.length === 2 ? '50%' : '33.33%',
cursor: pointer;
padding: 0 !important;
box-shadow: none !important;
&:hover {
border-radius: ${token.borderRadius}px;
background: rgba(0, 0, 0, 0.045);
}
`}
key={setting.name}
>
<a
role="button"
aria-label={setting.name}
onClick={(e) => {
e.preventDefault();
setOpen(false);
navigate(setting.path);
}} }}
title={compile(setting.title)} className={css`
style={{ display: 'block', color: 'inherit', minWidth: '4.5rem', padding: token.marginSM }} cursor: pointer;
href={setting.path} padding: 0 !important;
box-shadow: none !important;
&:hover {
border-radius: ${token.borderRadius}px;
background: rgba(0, 0, 0, 0.045);
}
`}
key={setting.name}
> >
<div style={{ fontSize: '1.2rem', textAlign: 'center', marginBottom: '0.3rem' }}> <a
{setting.icon || <SettingOutlined />} role="button"
</div> aria-label={setting.name}
<div onClick={(e) => {
style={{ e.preventDefault();
textAlign: 'center', setOpen(false);
whiteSpace: 'nowrap', navigate(setting.path);
overflow: 'hidden',
textOverflow: 'ellipsis',
fontSize: token.fontSizeSM,
}} }}
title={compile(setting.title)}
style={{ display: 'block', color: 'inherit', minWidth: '4.5rem', padding: token.marginSM }}
href={setting.path}
> >
{compile(setting.title)} <div style={{ fontSize: '1.2rem', textAlign: 'center', marginBottom: '0.3rem' }}>
</div> {setting.icon || <SettingOutlined />}
</a> </div>
</Card.Grid> <div
))} style={{
textAlign: 'center',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
fontSize: token.fontSizeSM,
}}
>
{compile(setting.title)}
</div>
</a>
</Card.Grid>
))}
</Card> </Card>
</div> </div>
} }