From daba6b094b68ae2c6abdeef3f03f89d5d1eaa61c Mon Sep 17 00:00:00 2001 From: Jason Date: Sun, 14 Sep 2025 23:22:57 +0800 Subject: [PATCH] fix(ui): refactor layout with fixed header and prevent layout shift - Convert layout to flexbox with fixed header and scrollable content area - Use overflow-y-scroll to always show scrollbar track - Prevents content width changes when switching between apps - Ensures consistent 12px spacing between header and content --- src/App.tsx | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index ebc4158..9d33fe2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -206,9 +206,9 @@ function App() { }; return ( -
- {/* Linear 风格的顶部导航 */} -
+
+ {/* 顶部导航区域 - 固定高度 */} +

@@ -247,29 +247,31 @@ function App() {

- {/* 主内容区域 */} -
-
- {/* 通知组件 */} - {notification && ( -
- {notification.message} -
- )} + {/* 主内容区域 - 独立滚动 */} +
+
+
+ {/* 通知组件 - 相对于视窗定位 */} + {notification && ( +
+ {notification.message} +
+ )} - + +