From 506ea5ce9825a81e80d9f914d56772e6fb387ee3 Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Thu, 30 Oct 2025 09:54:36 +0800 Subject: [PATCH] feat: optimize database admin UI with improved navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ Major Improvements: - Layout optimization: Reduced navigation panel to 350px, maximized content area - Navigation centralization: All operations in left panel with unified workflow - History stack management: Implemented step-by-step back navigation - Loading animations: Added loading spinners for all async operations - Scrollable lists: Added custom scrollbar for long theme lists (max-height: 600px) - Breadcrumb navigation: Visual path tracking with quick jump functionality 🎨 User Experience: - Navigation paths show current position (e.g., Home › 市级 › 开办电影院) - Clickable breadcrumbs for fast navigation to any step - "Back" button for sequential navigation - "Home" button to reset all selections - Custom scrollbar styling matching UI design - Responsive design with proper overflow handling 🔧 Technical Implementation: - Step state machine (1→2→3→4 workflow) - History stack for multi-step navigation - Dynamic breadcrumb generation - Smart state cleanup on quick jumps - Loading states for all API operations 📁 Files Modified: - static/db_admin.html: Complete UI/UX overhaul (734 lines) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- static/db_admin.html | 405 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 336 insertions(+), 69 deletions(-) diff --git a/static/db_admin.html b/static/db_admin.html index d07552a..17252f0 100644 --- a/static/db_admin.html +++ b/static/db_admin.html @@ -95,7 +95,7 @@ .content-area { display: grid; - grid-template-columns: 1fr 1fr; + grid-template-columns: 350px 1fr; gap: 30px; min-height: 600px; } @@ -113,13 +113,103 @@ margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #667eea; + display: flex; + justify-content: space-between; + align-items: center; + } + + .nav-controls { + display: flex; + gap: 8px; + } + + .back-button { + padding: 4px 12px; + background: #f0f0f0; + border: 1px solid #ddd; + border-radius: 4px; + font-size: 13px; + color: #666; + cursor: pointer; + transition: all 0.3s; + } + + .back-button:hover:not(:disabled) { + background: #e0e0e0; + border-color: #999; + } + + .back-button:disabled { + opacity: 0.5; + cursor: not-allowed; + } + + .breadcrumb { + background: white; + border-radius: 6px; + padding: 12px 16px; + margin-bottom: 15px; + border: 1px solid #e0e0e0; + font-size: 14px; + color: #666; + } + + .breadcrumb-item { + display: inline-flex; + align-items: center; + gap: 6px; + } + + .breadcrumb-item a { + color: #667eea; + text-decoration: none; + cursor: pointer; + transition: color 0.3s; + } + + .breadcrumb-item a:hover { + color: #5568d3; + text-decoration: underline; + } + + .breadcrumb-separator { + color: #ccc; + margin: 0 4px; + } + + .breadcrumb-current { + color: #333; + font-weight: 500; } .selection-area { background: white; border-radius: 8px; padding: 20px; - min-height: 500px; + max-height: 600px; + overflow-y: auto; + overflow-x: hidden; + position: relative; + } + + /* 自定义滚动条样式 */ + .selection-area::-webkit-scrollbar { + width: 8px; + } + + .selection-area::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 4px; + } + + .selection-area::-webkit-scrollbar-thumb { + background: #c0c0c0; + border-radius: 4px; + transition: background 0.3s; + } + + .selection-area::-webkit-scrollbar-thumb:hover { + background: #a0a0a0; } .item-list { @@ -332,6 +422,11 @@ .content-area { grid-template-columns: 1fr; } + + .panel:first-child { + max-height: 300px; + overflow-y: auto; + } } @@ -366,20 +461,26 @@
-

选择区域

+ +
-
+
-

主题/许可详情

-
+

详情内容

+
-

请先选择地区以查看可用主题

+

请选择区域开始导航

@@ -387,22 +488,35 @@