From b1cb9d2b8df096cbf8466130837918e014c21104 Mon Sep 17 00:00:00 2001 From: awenes <1121353141@qq.com> Date: Tue, 26 Sep 2023 22:51:28 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E7=AE=A1=E7=90=86=E5=91=98=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/RightContent/AvatarDropdown.tsx | 15 ++++++++++++--- .../console-fe/src/locales/zh-CN/component.ts | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/eiam-console/src/main/console-fe/src/components/RightContent/AvatarDropdown.tsx b/eiam-console/src/main/console-fe/src/components/RightContent/AvatarDropdown.tsx index d213b532..6ae38e01 100644 --- a/eiam-console/src/main/console-fe/src/components/RightContent/AvatarDropdown.tsx +++ b/eiam-console/src/main/console-fe/src/components/RightContent/AvatarDropdown.tsx @@ -15,7 +15,7 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import { LogoutOutlined } from '@ant-design/icons'; +import { LogoutOutlined, UserOutlined } from '@ant-design/icons'; import { history, useIntl, useModel } from '@umijs/max'; import { Spin } from 'antd'; import type { MenuInfo } from 'rc-menu/lib/interface'; @@ -26,6 +26,7 @@ import { isLoginPath, LOGIN_PATH } from '@/utils/utils'; import { outLogin } from '@/services'; import queryString from 'query-string'; import { createStyles } from 'antd-style'; +import { ItemType } from 'antd/es/menu/hooks/useItems'; export type GlobalHeaderRightProps = { menu?: boolean; @@ -90,7 +91,7 @@ export const AvatarDropdown: React.FC = ({ children }) = }); return; } - history.push(`/account/${key}`); + history.push(`/user/${key}`); }, [initialState, setInitialState], ); @@ -117,7 +118,15 @@ export const AvatarDropdown: React.FC = ({ children }) = return loading; } - const menuItems = [ + const menuItems: ItemType[] = [ + { + key: 'center', + icon: , + label: intl.formatMessage({ id: 'components.right_content.center' }), + }, + { + type: 'divider', + }, { key: 'logout', icon: , diff --git a/eiam-console/src/main/console-fe/src/locales/zh-CN/component.ts b/eiam-console/src/main/console-fe/src/locales/zh-CN/component.ts index 24117190..6dc2eff4 100644 --- a/eiam-console/src/main/console-fe/src/locales/zh-CN/component.ts +++ b/eiam-console/src/main/console-fe/src/locales/zh-CN/component.ts @@ -20,7 +20,7 @@ export default { 'component.tagSelect.collapse': '收起', 'component.tagSelect.all': '全部', 'components.right_content.center': '个人中心', - 'components.right_content.setting': '个人设置', + 'components.right_content.change-password': '修改密码', 'components.right_content.logout': '退出登录', // excel import component