From 134deb80fbc36a4102f35b9038fb1122c5d590b6 Mon Sep 17 00:00:00 2001 From: imeepos Date: Tue, 15 Jul 2025 20:18:28 +0800 Subject: [PATCH] feat: Optimize UI layout with fixed navigation and scrollable content Layout Optimization: - Fixed navigation bar at the top with sticky positioning - Main content area now properly scrollable with flex layout - Improved overall page structure for better UX Scrolling Enhancements: - Added custom scrollbar styling for better visual appeal - Implemented smooth scrolling behavior across the application - Optimized scroll areas in ProjectDetails, TemplateManagement, AiClassificationSettings, and ModelList - Added proper overflow handling for long content lists Visual Improvements: - Beautiful custom scrollbars with hover effects - Proper height constraints for content areas (calc(100vh-16rem)) - Enhanced scrolling experience with backdrop blur effects - Added scroll indicators and shadow effects for better UX Responsive Design: - Mobile-optimized scrolling behavior - Proper touch scrolling on mobile devices - Adaptive content heights for different screen sizes - Maintained accessibility with reduced motion support Technical Improvements: - Fixed JSX syntax errors in TemplateManagement and ModelList - Improved component structure for better maintainability - Added comprehensive CSS classes for scroll management - Enhanced performance with optimized overflow handling All pages now provide a smooth, professional scrolling experience while keeping the navigation always accessible. --- apps/desktop/src/App.tsx | 26 +-- apps/desktop/src/components/ModelList.tsx | 9 +- apps/desktop/src/components/Navigation.tsx | 2 +- .../src/pages/AiClassificationSettings.tsx | 4 +- apps/desktop/src/pages/ProjectDetails.tsx | 2 +- apps/desktop/src/pages/TemplateManagement.tsx | 16 +- apps/desktop/src/styles/design-system.css | 157 ++++++++++++++++++ 7 files changed, 189 insertions(+), 27 deletions(-) diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index 0df17fa..766d1e8 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -62,20 +62,22 @@ function App() { return ( -
- {/* 导航栏 */} +
+ {/* 固定的导航栏 */} - {/* 主要内容区域 */} -
- - } /> - } /> - } /> - } /> - } /> - } /> - + {/* 可滚动的主要内容区域 */} +
+
+ + } /> + } /> + } /> + } /> + } /> + } /> + +
{/* 创建项目模态框 */} diff --git a/apps/desktop/src/components/ModelList.tsx b/apps/desktop/src/components/ModelList.tsx index cd22fb9..c1fbcbd 100644 --- a/apps/desktop/src/components/ModelList.tsx +++ b/apps/desktop/src/components/ModelList.tsx @@ -346,9 +346,10 @@ const ModelList: React.FC = ({ onModelSelect }) => { />
- {/* 模特列表 */} - {filteredModels.length === 0 ? ( -
+ {/* 模特列表 - 优化滚动 */} +
+ {filteredModels.length === 0 ? ( +
@@ -396,7 +397,7 @@ const ModelList: React.FC = ({ onModelSelect }) => { ))}
)} - +
diff --git a/apps/desktop/src/components/Navigation.tsx b/apps/desktop/src/components/Navigation.tsx index e9b29bc..945b573 100644 --- a/apps/desktop/src/components/Navigation.tsx +++ b/apps/desktop/src/components/Navigation.tsx @@ -52,7 +52,7 @@ const Navigation: React.FC = () => { }; return ( -