From a2a7cb893b50797721e3c4a8eb6c8cc189b4d4e5 Mon Sep 17 00:00:00 2001 From: TradeMate Dev Date: Thu, 21 May 2026 09:53:30 +0800 Subject: [PATCH] Add responsive desktop layout with left sidebar navigation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Desktop (≥1024px): - Tab bar becomes a 220px left sidebar with brand name and nav items - Page content shifts right and max-width constrained to 1200px - Base font-size reset to 16px for readable text - AI assistant floating button stays in bottom-right corner - No change to mobile layout (bottom tab bar preserved) --- uni-app/src/App.vue | 33 ++++++++++++ uni-app/src/custom-tab-bar/index.vue | 77 ++++++++++++++++++++++++++-- 2 files changed, 107 insertions(+), 3 deletions(-) diff --git a/uni-app/src/App.vue b/uni-app/src/App.vue index b18e9c6..f4b3a23 100644 --- a/uni-app/src/App.vue +++ b/uni-app/src/App.vue @@ -26,4 +26,37 @@ uni-page-body { overflow-y: auto !important; min-height: 100% !important; } + +/* ===== Desktop responsive (≥1024px) ===== */ +@media (min-width: 1024px) { + /* Sidebar — shift page content right */ + uni-page-body { + margin-left: 220px !important; + font-size: 16px !important; + } + + /* Constrain + center page content */ + uni-page-body > view { + max-width: 1200px !important; + margin-left: auto !important; + margin-right: auto !important; + padding: 40px 48px !important; + } + + /* Cards more breathing room */ + uni-page-body .card { + padding: 32px !important; + border-radius: 20px !important; + } + + /* Fix floating AI assistant (clear sidebar + reasonable position) */ + .ai-float-btn { + right: 40px !important; + bottom: 40px !important; + } + .ai-dialog { + right: 40px !important; + bottom: 100px !important; + } +} diff --git a/uni-app/src/custom-tab-bar/index.vue b/uni-app/src/custom-tab-bar/index.vue index cc1f1f0..b882c48 100644 --- a/uni-app/src/custom-tab-bar/index.vue +++ b/uni-app/src/custom-tab-bar/index.vue @@ -1,13 +1,15 @@ @@ -55,6 +57,7 @@ onUnmounted(() => { \ No newline at end of file