feat: fix mobile AI full-width layout and simplify instance stats
Move hub AI mobile CSS after desktop grid rules so chat fills the screen. Hide exchange and total-trade stat cards on phone across all instances and compact export bar. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+139
-115
@@ -2501,121 +2501,6 @@ body.login-page {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.ai-mobile-tabs {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.ai-mobile-tab {
|
||||
flex: 1;
|
||||
min-height: 40px;
|
||||
padding: 8px 12px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border-soft);
|
||||
background: var(--inset-surface);
|
||||
color: var(--muted);
|
||||
font-family: var(--font);
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.ai-mobile-tab.is-active {
|
||||
color: var(--text);
|
||||
border-color: var(--accent);
|
||||
background: var(--accent-dim);
|
||||
box-shadow: var(--glow);
|
||||
}
|
||||
|
||||
body.hub-page-ai .app-shell {
|
||||
padding-bottom: max(8px, env(safe-area-inset-bottom));
|
||||
height: 100dvh;
|
||||
max-height: 100dvh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body.hub-page-ai {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body.hub-page-ai #page-ai {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ai-layout {
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: minmax(0, 1fr);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ai-layout[data-ai-mobile-tab="chat"] .ai-summary-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ai-layout[data-ai-mobile-tab="summary"] .ai-chat-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ai-layout[data-ai-mobile-tab="chat"] .ai-chat-panel,
|
||||
.ai-layout[data-ai-mobile-tab="summary"] .ai-summary-panel {
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ai-chat-panel {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.ai-chat-messages {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
.ai-chat-form {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
margin: 0 -14px;
|
||||
padding: 10px 14px max(10px, env(safe-area-inset-bottom));
|
||||
background: color-mix(in srgb, var(--panel) 92%, transparent);
|
||||
backdrop-filter: blur(10px);
|
||||
border-top: 1px solid var(--border-soft);
|
||||
box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.28);
|
||||
}
|
||||
|
||||
.ai-chat-form textarea {
|
||||
min-height: 44px;
|
||||
max-height: 120px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.ai-chat-compose-actions {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ai-chat-upload-btn,
|
||||
#btn-ai-chat-send {
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
#btn-ai-chat-send {
|
||||
min-width: 76px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ai-msg-row-user {
|
||||
max-width: 92%;
|
||||
}
|
||||
|
||||
.ai-msg-row-coach {
|
||||
max-width: 96%;
|
||||
}
|
||||
|
||||
.page-head {
|
||||
margin: 16px 0 12px;
|
||||
}
|
||||
@@ -3925,6 +3810,145 @@ body.hub-page-ai #page-ai {
|
||||
.ai-mobile-tabs {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 手机 AI:须在 .ai-layout 双列定义之后,避免被覆盖成半屏 */
|
||||
@media (max-width: 720px) {
|
||||
body.hub-page-ai .app-shell {
|
||||
padding-bottom: max(8px, env(safe-area-inset-bottom));
|
||||
height: 100dvh;
|
||||
max-height: 100dvh;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
body.hub-page-ai {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body.hub-page-ai #page-ai {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-mobile-tabs {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-bottom: 8px;
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-mobile-tab {
|
||||
flex: 1;
|
||||
min-height: 40px;
|
||||
padding: 8px 12px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border-soft);
|
||||
background: var(--inset-surface);
|
||||
color: var(--muted);
|
||||
font-family: var(--font);
|
||||
font-size: 0.82rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-mobile-tab.is-active {
|
||||
color: var(--text);
|
||||
border-color: var(--accent);
|
||||
background: var(--accent-dim);
|
||||
box-shadow: var(--glow);
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
gap: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-layout[data-ai-mobile-tab="chat"] .ai-summary-panel,
|
||||
body.hub-page-ai .ai-layout[data-ai-mobile-tab="summary"] .ai-chat-panel {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-layout[data-ai-mobile-tab="chat"] .ai-chat-panel,
|
||||
body.hub-page-ai .ai-layout[data-ai-mobile-tab="summary"] .ai-summary-panel {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-panel {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-chat-panel {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-chat-messages {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-chat-form {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 10px 0 max(10px, env(safe-area-inset-bottom));
|
||||
background: color-mix(in srgb, var(--panel) 92%, transparent);
|
||||
backdrop-filter: blur(10px);
|
||||
border-top: 1px solid var(--border-soft);
|
||||
box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.28);
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-chat-form textarea {
|
||||
min-height: 44px;
|
||||
max-height: 120px;
|
||||
font-size: 16px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-chat-compose-actions {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-chat-upload-btn,
|
||||
body.hub-page-ai #btn-ai-chat-send {
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
body.hub-page-ai #btn-ai-chat-send {
|
||||
min-width: 76px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-msg-row-user {
|
||||
max-width: 92%;
|
||||
}
|
||||
|
||||
body.hub-page-ai .ai-msg-row-coach {
|
||||
max-width: 96%;
|
||||
}
|
||||
}
|
||||
|
||||
.ai-panel {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--border-soft);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'" />
|
||||
<noscript><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" /></noscript>
|
||||
<link rel="stylesheet" href="/assets/app.css?v=20260609-hub-mobile-ai-v1" />
|
||||
<link rel="stylesheet" href="/assets/app.css?v=20260609-hub-mobile-ai-v2" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-bg" aria-hidden="true"></div>
|
||||
@@ -424,6 +424,6 @@
|
||||
<script src="/assets/chart.js?v=20260608-market-tz8"></script>
|
||||
<script src="/assets/archive.js?v=20260608-hub-archive-history"></script>
|
||||
<script src="/assets/ai_review_render.js?v=2"></script>
|
||||
<script src="/assets/app.js?v=20260609-hub-mobile-ai-v1"></script>
|
||||
<script src="/assets/app.js?v=20260609-hub-mobile-ai-v2"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user