调整修改密码入口位置

This commit is contained in:
mtvpls
2026-05-09 09:25:17 +08:00
parent 624cb9b084
commit 2480b4d28b
2 changed files with 29 additions and 13 deletions
+5 -12
View File
@@ -15,7 +15,6 @@ import {
Gauge,
Globe,
Home,
KeyRound,
LogOut,
MessageSquare,
Monitor,
@@ -1615,17 +1614,6 @@ export const UserMenu: React.FC = () => {
</button>
)}
{/* 修改密码按钮 */}
{showChangePassword && (
<button
onClick={handleChangePassword}
className='w-full px-3 py-2 text-left flex items-center gap-2.5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors text-sm'
>
<KeyRound className='w-4 h-4 text-gray-500 dark:text-gray-400' />
<span className='font-medium'></span>
</button>
)}
{/* 订阅按钮 */}
{subscribeEnabled && (
<button
@@ -3749,6 +3737,7 @@ export const UserMenu: React.FC = () => {
avatarText={avatarText}
roleBadgeClassName={roleBadgeClassName}
showDeviceManagement={storageType !== 'localstorage'}
showChangePassword={showChangePassword}
onOpenEmailSettings={() => {
setIsProfileCenterOpen(false);
setIsEmailSettingsOpen(true);
@@ -3759,6 +3748,10 @@ export const UserMenu: React.FC = () => {
setIsDeviceManagementOpen(true);
loadDevices();
}}
onOpenChangePassword={() => {
setIsProfileCenterOpen(false);
handleChangePassword();
}}
/>
{/* 使用 Portal 将设置面板渲染到 document.body */}