feat: update user's avatar click

1. Cancel clicking the user avatar button to enter the user center
2. Add a jump to User Center in the hover pop-up window of the user's avatar

Change-Id: Id01a5d199bd9e7a922ac605c1f9902403830a944
This commit is contained in:
zhangjingwei 2024-01-30 16:25:40 +08:00
parent 8a1d7ab034
commit dc54dfd955
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,8 @@
---
features:
- |
Update user's avatar click:
1. Cancel clicking the user avatar button to enter the user center
2. Add a jump to "User Center" in the hover pop-up window of the user's avatar

View File

@ -152,6 +152,13 @@ export class AvatarDropdown extends React.Component {
</Menu.Item>
<Menu.Divider className={styles['menu-divider']} />
{this.renderLanguageMenuItem()}
<Menu.Divider className={styles['menu-divider']} />
<Menu.Item key="userCenter" className={styles['menu-item']}>
<Button href="/user/center" type="link" style={{ textAlign: 'left' }}>
{t('User Center')}
</Button>
</Menu.Item>
<Menu.Divider className={styles['menu-divider']} />
<Menu.Item key="password" className={styles['menu-item']}>
<ItemActionButtons
actions={{ moreActions: [{ action: Password }] }}
@ -182,7 +189,6 @@ export class AvatarDropdown extends React.Component {
shape="circle"
icon={<UserOutlined />}
className={styles.avatar}
href="/user/center"
/>
</div>
</HeaderDropdown>