feat(hub): mobile AI one-screen and dashboard monitor counts

Fix mobile AI to scroll only in the chat area. Dashboard cards show monitor item counts with expand-to-fullscreen and color-coded position floating P&L.
This commit is contained in:
dekun
2026-06-11 11:27:28 +08:00
parent 1042fdeef3
commit 08ae171e48
7 changed files with 237 additions and 57 deletions
+41
View File
@@ -3821,6 +3821,8 @@ html[data-theme="light"] button.danger {
/* --- Hub AI 教练(整页一屏,内容区内滚动)--- */
body.hub-page-ai {
overflow: hidden;
height: 100dvh;
max-height: 100dvh;
}
body.hub-page-ai .app-shell {
padding-bottom: 12px;
@@ -3831,6 +3833,13 @@ body.hub-page-ai .app-shell {
flex-direction: column;
box-sizing: border-box;
}
body.hub-page-ai .app-shell > #page-ai {
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
body.hub-page-ai .app-header {
flex-shrink: 0;
margin-bottom: 4px;
@@ -3876,6 +3885,11 @@ body.hub-page-ai #page-ai {
/* 手机 AI:须在 .ai-layout 双列定义之后,避免被覆盖成半屏 */
@media (max-width: 720px) {
html:has(body.hub-page-ai) {
height: 100%;
overflow: hidden;
}
body.hub-page-ai .app-shell {
padding-bottom: max(8px, env(safe-area-inset-bottom));
height: var(--hub-vvh, 100dvh);
@@ -3888,8 +3902,24 @@ body.hub-page-ai #page-ai {
}
body.hub-page-ai {
position: fixed;
inset: 0;
width: 100%;
overflow: hidden;
background: var(--bg);
overscroll-behavior: none;
}
body.hub-page-ai .app-header {
padding: 6px 0;
margin-bottom: 2px;
gap: 8px;
}
body.hub-page-ai .top-nav a {
min-height: 34px;
padding: 6px 10px;
font-size: 11px;
}
body.hub-page-ai.hub-ai-keyboard-open .app-header,
@@ -4062,8 +4092,19 @@ body.hub-page-ai #page-ai {
body.hub-page-ai .ai-chat-messages {
flex: 1 1 auto;
min-height: 0;
max-height: none;
padding: 4px 2px 8px;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
}
body.hub-page-ai .ai-layout[data-ai-mobile-tab="history"] .ai-chat-history-list {
flex: 1 1 auto;
min-height: 0;
overflow-y: auto;
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
}