2.0阶段1: h5重构为底部导航四Tab(任务/技能/模型/设置),app.js拆分为core/tasks/skills/models/settings,聊天详情改为全屏覆盖页

This commit is contained in:
2026-09-01 16:34:16 +08:00
parent 86ec831b74
commit 4968241951
7 changed files with 355 additions and 132 deletions
+48
View File
@@ -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; }