From b76ef06c62c6e22e6c48ef32eacba313286c8db5 Mon Sep 17 00:00:00 2001 From: ZHENG XIAOYI Date: Fri, 6 Feb 2026 21:39:28 +0800 Subject: [PATCH] style: enhance visual hierarchy of Profile page components --- src/components/AdminLayout.tsx | 19 +++++++++--------- src/pages/Profile.tsx | 36 ++++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/src/components/AdminLayout.tsx b/src/components/AdminLayout.tsx index a87e1ce..1378d5b 100644 --- a/src/components/AdminLayout.tsx +++ b/src/components/AdminLayout.tsx @@ -67,14 +67,6 @@ function AdminLayout() { label: '用户资料', onClick: () => navigate('/admin/profile'), }, - { - key: 'changePassword', - icon: , - label: '修改密码', - onClick: () => { - message.info('修改密码功能即将上线'); - }, - }, { type: 'divider' as const, }, @@ -96,6 +88,15 @@ function AdminLayout() { return 'dashboard'; }; + const getTitle = () => { + const path = location.pathname; + if (path.includes('/dashboard')) return '控制台'; + if (path.includes('/generate')) return '生成二维码'; + if (path.includes('/manage')) return '企业管理'; + if (path.includes('/profile')) return '用户资料'; + return '控制台'; + }; + return (
- {menuItems.find((item) => item.key === getSelectedKey())?.label} + {getTitle()}
diff --git a/src/pages/Profile.tsx b/src/pages/Profile.tsx index fb67a98..3798ca2 100644 --- a/src/pages/Profile.tsx +++ b/src/pages/Profile.tsx @@ -1,6 +1,6 @@ import { useState, useEffect } from 'react'; import { Form, Input, Button, Card, message, Avatar, Descriptions, Space, Modal, Row, Col } from 'antd'; -import { UserOutlined, LockOutlined, SafetyOutlined } from '@ant-design/icons'; +import { UserOutlined, LockOutlined, SafetyOutlined, KeyOutlined, ExclamationCircleOutlined } from '@ant-design/icons'; import { authApi } from '@/services/api'; import type { User } from '@/types'; @@ -151,13 +151,45 @@ function ProfilePage() {
- 双因素验证 + 双因素验证(TOTP)
+ + +
+ + + 通行密钥(Passkey) + + +
+
+ + +
+ + + 注销账户 + + +
+