From b1651dabfc8227090e0df4cbe8b5e71a2a1e9bff Mon Sep 17 00:00:00 2001 From: katelya Date: Thu, 4 Sep 2025 22:40:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=81=A2=E5=A4=8D=E5=8E=9F=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=B7=BB=E5=8A=A0=E7=8B=AC?= =?UTF-8?q?=E7=AB=8B=E7=9A=84=E5=86=85=E5=AE=B9=E8=BF=87=E6=BB=A4=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 恢复UserMenu中原有的本地设置功能(聚合搜索、优选测速、豆瓣代理、图片代理等) - 添加独立的'内容过滤'菜单项,避免与原设置功能混淆 - 保持原有设置功能的完整性和重要配置项 --- src/components/UserMenu.tsx | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/components/UserMenu.tsx b/src/components/UserMenu.tsx index 04d6099..4fd576a 100644 --- a/src/components/UserMenu.tsx +++ b/src/components/UserMenu.tsx @@ -2,7 +2,7 @@ 'use client'; -import { KeyRound, LogOut, Settings, Shield, User, X } from 'lucide-react'; +import { KeyRound, LogOut, Settings, Shield, User, X, Filter } from 'lucide-react'; import { useRouter } from 'next/navigation'; import { useEffect, useState } from 'react'; import { createPortal } from 'react-dom'; @@ -208,12 +208,18 @@ export const UserMenu: React.FC = () => { } }; + // 处理设置点击 const handleSettings = () => { setIsOpen(false); - router.push('/settings'); + setIsSettingsOpen(true); }; - const handleCloseSettings = () => { + // 处理内容过滤设置 + const handleContentFilter = () => { + setIsOpen(false); + // 跳转到内容过滤设置页面 + router.push('/settings'); + }; const handleCloseSettings = () => { setIsSettingsOpen(false); }; @@ -360,7 +366,16 @@ export const UserMenu: React.FC = () => { 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' > - 设置 + 本地设置 + + + {/* 内容过滤按钮 */} + {/* 管理面板按钮 */}