From 496824195105bd750871d9c63cabf4da7e58a259 Mon Sep 17 00:00:00 2001 From: kicer Date: Tue, 1 Sep 2026 16:34:16 +0800 Subject: [PATCH] =?UTF-8?q?2.0=E9=98=B6=E6=AE=B51:=20h5=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E4=B8=BA=E5=BA=95=E9=83=A8=E5=AF=BC=E8=88=AA=E5=9B=9BTab(?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1/=E6=8A=80=E8=83=BD/=E6=A8=A1=E5=9E=8B/?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE),app.js=E6=8B=86=E5=88=86=E4=B8=BAcore/tasks?= =?UTF-8?q?/skills/models/settings,=E8=81=8A=E5=A4=A9=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=85=A8=E5=B1=8F=E8=A6=86=E7=9B=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/server/public/css/style.css | 48 ++++++ app/server/public/index.html | 69 +++++++- app/server/public/js/core.js | 112 +++++++++++++ app/server/public/js/models.js | 35 ++++ app/server/public/js/settings.js | 25 +++ app/server/public/js/skills.js | 11 ++ app/server/public/js/{app.js => tasks.js} | 187 +++++++--------------- 7 files changed, 355 insertions(+), 132 deletions(-) create mode 100644 app/server/public/js/core.js create mode 100644 app/server/public/js/models.js create mode 100644 app/server/public/js/settings.js create mode 100644 app/server/public/js/skills.js rename app/server/public/js/{app.js => tasks.js} (74%) diff --git a/app/server/public/css/style.css b/app/server/public/css/style.css index 8d3823e..7b9dbb5 100644 --- a/app/server/public/css/style.css +++ b/app/server/public/css/style.css @@ -300,3 +300,51 @@ body { padding: 9px 16px; border-radius: 20px; font-size: 13.5px; z-index: 200; max-width: 80%; text-align: center; } + +/* ================= 2.0:底部导航 + Tab 页 ================= */ +.tabbar { + position: absolute; left: 0; right: 0; bottom: 0; z-index: 50; + display: flex; background: #fff; border-top: 1px solid #e8e8ee; + height: calc(56px + env(safe-area-inset-bottom)); + padding-bottom: env(safe-area-inset-bottom); +} +.tab-item { + flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; + gap: 2px; padding-top: 6px; + color: #8a93a6; text-decoration: none; font-size: 11px; + -webkit-tap-highlight-color: transparent; user-select: none; +} +.tab-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } +.tab-item.active { color: #2a5299; font-weight: 600; } +.tab-item:active { opacity: 0.7; } + +/* Tab 内容页:占满除底部导航外的区域(导航隐藏时被聊天页盖住,无影响) */ +.tab-page { + position: absolute; top: 0; left: 0; right: 0; + bottom: calc(56px + env(safe-area-inset-bottom)); + display: flex; flex-direction: column; background: #f2f3f7; +} +.tab-body-area { flex: 1; overflow-y: auto; padding: 10px 12px 16px; } + +/* 聊天详情为全屏覆盖页,需盖住底部导航 */ +#chat-page { z-index: 60; } + +/* ---- 模型占位卡片(阶段 4 会扩展为用量/费用卡) ---- */ +.model-card { + background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; + box-shadow: 0 1px 4px rgba(30,40,90,0.06); +} +.model-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; } +.model-card-name { font-weight: 600; font-size: 15px; } +.model-card-state { font-size: 11px; padding: 2px 8px; border-radius: 9px; } +.model-card-state.idle { background: #e3f2e6; color: #217a34; } +.model-card-state.busy { background: #fdecea; color: #b3382c; } +.model-card-meta { font-size: 12px; color: #888; margin-top: 4px; } + +/* ---- 设置页行 ---- */ +.settings-row { + display: flex; align-items: center; justify-content: space-between; gap: 10px; + background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; + box-shadow: 0 1px 4px rgba(30,40,90,0.06); font-size: 14px; +} +.ghost-btn.small { flex: none; padding: 6px 12px; font-size: 13px; border-radius: 8px; } diff --git a/app/server/public/index.html b/app/server/public/index.html index 6553d59..71cd4b4 100644 --- a/app/server/public/index.html +++ b/app/server/public/index.html @@ -12,8 +12,9 @@
- -
+ + +