Add responsive mobile layout, records cards, and tablet settings fold fix.
Mobile gets compact trade/records UI with detail modals; static assets are cache-busted and settings cards fold correctly on tablet grid layout. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,188 @@
|
||||
/* Copyright (c) 2025-2026 马建军. All rights reserved.
|
||||
* 交易记录与复盘 — 手机简洁列表 + 详情弹窗
|
||||
*/
|
||||
|
||||
.records-page .records-mobile-list {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.records-page .records-desktop-only {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.records-mobile-item {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
border: 1px solid var(--card-border);
|
||||
border-radius: 12px;
|
||||
background: var(--card-inner);
|
||||
padding: .75rem .85rem;
|
||||
margin-bottom: .55rem;
|
||||
cursor: pointer;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
transition: border-color .2s, box-shadow .2s;
|
||||
}
|
||||
|
||||
.records-mobile-item:hover,
|
||||
.records-mobile-item:focus-visible {
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 1px rgba(56, 189, 248, .2);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.records-mobile-item-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: .5rem;
|
||||
margin-bottom: .35rem;
|
||||
}
|
||||
|
||||
.records-mobile-symbol {
|
||||
font-size: .92rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-title);
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.records-mobile-item-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: .35rem .5rem;
|
||||
font-size: .72rem;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: .3rem;
|
||||
}
|
||||
|
||||
.records-mobile-item-foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: .5rem;
|
||||
}
|
||||
|
||||
.records-mobile-pnl {
|
||||
font-size: .88rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.records-mobile-pnl.is-profit { color: var(--profit); }
|
||||
.records-mobile-pnl.is-loss { color: var(--loss); }
|
||||
.records-mobile-pnl.is-flat { color: var(--text-muted); }
|
||||
|
||||
.records-mobile-chevron {
|
||||
font-size: .72rem;
|
||||
color: var(--accent);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.records-mobile-empty {
|
||||
padding: 1.25rem .5rem;
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
font-size: .85rem;
|
||||
}
|
||||
|
||||
.records-page .trade-switch-label.records-desktop-only {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#trade-detail-modal .records-detail-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: .55rem .75rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#trade-detail-modal .records-detail-item label {
|
||||
display: block;
|
||||
font-size: .68rem;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: .12rem;
|
||||
}
|
||||
|
||||
#trade-detail-modal .records-detail-item div {
|
||||
font-size: .84rem;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.35;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
#trade-detail-modal .records-detail-item.wide {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
#trade-detail-modal .records-detail-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .45rem;
|
||||
padding-top: .75rem;
|
||||
border-top: 1px solid var(--table-border);
|
||||
}
|
||||
|
||||
#trade-detail-modal .records-detail-actions a,
|
||||
#trade-detail-modal .records-detail-actions button {
|
||||
font-size: .78rem;
|
||||
padding: .45rem .7rem;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.records-review-mobile .records-mobile-item.is-emotion {
|
||||
border-color: rgba(239, 68, 68, .35);
|
||||
}
|
||||
|
||||
html:is([data-mobile="1"], .layout-phone) .records-page .records-mobile-list,
|
||||
html:is([data-layout="phone"], .layout-phone) .records-page .records-mobile-list {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html:is([data-mobile="1"], .layout-phone) .records-page .records-desktop-only,
|
||||
html:is([data-layout="phone"], .layout-phone) .records-page .records-desktop-only {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
html:is([data-mobile="1"], .layout-phone) .records-page .records-trade-card .card-body,
|
||||
html:is([data-layout="phone"], .layout-phone) .records-page .records-trade-card .card-body {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html:is([data-mobile="1"], .layout-phone) .records-page .records-equity-card #equity-curve-chart,
|
||||
html:is([data-layout="phone"], .layout-phone) .records-page .records-equity-card #equity-curve-chart {
|
||||
min-height: 180px;
|
||||
}
|
||||
|
||||
html:is([data-mobile="1"], .layout-phone) .records-page .preset-tabs,
|
||||
html:is([data-layout="phone"], .layout-phone) .records-page .preset-tabs {
|
||||
flex-wrap: wrap;
|
||||
gap: .35rem;
|
||||
}
|
||||
|
||||
html:is([data-mobile="1"], .layout-phone) .records-page .preset-tabs a,
|
||||
html:is([data-layout="phone"], .layout-phone) .records-page .preset-tabs a {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
min-width: 0;
|
||||
padding: .45rem .35rem;
|
||||
font-size: .75rem;
|
||||
}
|
||||
|
||||
html:is([data-mobile="1"], .layout-phone) #review-modal .review-detail-headers,
|
||||
html:is([data-mobile="1"], .layout-phone) #review-modal .review-detail-values,
|
||||
html:is([data-layout="phone"], .layout-phone) #review-modal .review-detail-headers,
|
||||
html:is([data-layout="phone"], .layout-phone) #review-modal .review-detail-values {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
@media (pointer: coarse) and (max-width: 600px) {
|
||||
.records-page .records-mobile-list { display: block; }
|
||||
.records-page .records-desktop-only { display: none !important; }
|
||||
}
|
||||
Reference in New Issue
Block a user