From 936d3c48190d8e27f2de0fae8187d324e555a4ba Mon Sep 17 00:00:00 2001 From: LanQin Date: Sun, 21 Jun 2026 00:02:30 +0800 Subject: [PATCH] =?UTF-8?q?style(web):=20=E7=BB=9F=E4=B8=80=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E8=A7=86=E5=8F=A3=E4=B8=8E=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将邮件、个人中心与规则弹窗从 `100dvh` 调整为 `h-svh`,减少移动端视口抖动。 - 优化邮件正文编辑器的基础布局与滚动样式,提升输入区可用性。 - 移除 `protected-layout` 中切换路由时自动关闭移动侧栏的逻辑。 --- apps/web/src/components/protected-layout.tsx | 9 --------- apps/web/src/pages/mail.tsx | 8 ++++---- apps/web/src/pages/profile.tsx | 6 +++--- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/apps/web/src/components/protected-layout.tsx b/apps/web/src/components/protected-layout.tsx index 11ccc66..16abe19 100644 --- a/apps/web/src/components/protected-layout.tsx +++ b/apps/web/src/components/protected-layout.tsx @@ -133,15 +133,6 @@ function ProtectedContent() { function AdminSectionItems({ activeSection }: { activeSection: string }) { const { isMobile, setOpenMobile } = useSidebar() - const location = useLocation() - const locationKey = `${location.pathname}${location.search}` - const previousLocationKey = React.useRef(locationKey) - - React.useEffect(() => { - const previous = previousLocationKey.current - previousLocationKey.current = locationKey - if (isMobile && previous !== locationKey) setOpenMobile(false) - }, [isMobile, locationKey, setOpenMobile]) function closeMobile() { if (isMobile) setOpenMobile(false) diff --git a/apps/web/src/pages/mail.tsx b/apps/web/src/pages/mail.tsx index 485074d..b06d4fd 100644 --- a/apps/web/src/pages/mail.tsx +++ b/apps/web/src/pages/mail.tsx @@ -748,7 +748,7 @@ export function MailPage() { ) return ( -
+
{isMobile ? (
@@ -760,7 +760,7 @@ export function MailPage() { 邮箱导航 -
{sidebarContent}
+
{sidebarContent}