feat: circular fund account cards with fullscreen detail view

Show per-exchange balances as clickable circles with mini curves; open a fullscreen panel for equity history and drawdown.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-10 17:04:21 +08:00
parent ba629ea0ee
commit ec8607932b
3 changed files with 403 additions and 89 deletions
+189 -42
View File
@@ -4488,68 +4488,121 @@ body.hub-page-ai #page-ai {
overflow: hidden;
}
.funds-section-title {
margin: 0 0 10px;
margin: 0 0 4px;
font-size: 0.95rem;
font-weight: 600;
}
.funds-accounts {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 12px;
.funds-section-hint {
margin: 0 0 14px;
font-size: 0.75rem;
color: var(--muted);
}
.funds-ac-card {
background: var(--panel);
border: 1px solid var(--border-soft);
border-radius: var(--radius);
padding: 12px 14px;
.funds-accounts {
display: flex;
flex-wrap: wrap;
gap: 18px 22px;
justify-content: flex-start;
padding: 4px 0 8px;
}
.funds-ac-item {
display: flex;
flex-direction: column;
gap: 8px;
}
.funds-ac-card.is-off {
opacity: 0.72;
}
.funds-ac-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
width: 118px;
flex: 0 0 auto;
}
.funds-ac-head h3 {
margin: 0;
font-size: 0.92rem;
.funds-ac-circle {
position: relative;
width: 112px;
height: 112px;
padding: 0;
border: 2px solid var(--border-soft);
border-radius: 50%;
background: var(--panel);
cursor: pointer;
overflow: hidden;
transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.funds-ac-badge {
font-size: 0.68rem;
padding: 2px 8px;
border-radius: 999px;
border: 1px solid var(--border-soft);
color: var(--muted);
.funds-ac-circle:hover:not(:disabled) {
border-color: var(--accent, #3b82f6);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
transform: translateY(-1px);
}
.funds-ac-stats {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 6px 10px;
font-size: 0.78rem;
.funds-ac-circle:focus-visible {
outline: 2px solid var(--accent, #3b82f6);
outline-offset: 3px;
}
.funds-ac-stats .k {
color: var(--muted);
margin-right: 6px;
.funds-ac-circle.is-off {
opacity: 0.62;
cursor: default;
}
.funds-ac-stats .v {
font-variant-numeric: tabular-nums;
.funds-ac-circle.is-off:hover {
transform: none;
box-shadow: none;
border-color: var(--border-soft);
}
.funds-ac-chart {
height: 72px;
min-height: 72px;
border-radius: 6px;
.funds-ac-circle-chart {
position: absolute;
inset: 6px;
border-radius: 50%;
overflow: hidden;
background: var(--inset-surface);
font-size: 0.72rem;
font-size: 0.68rem;
color: var(--muted);
display: flex;
align-items: center;
justify-content: center;
text-align: center;
line-height: 1.25;
padding: 4px;
}
.funds-ac-circle-overlay {
position: absolute;
inset: 0;
border-radius: 50%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
padding: 10px;
background: radial-gradient(circle at 50% 55%, rgba(11, 14, 24, 0.55) 0%, rgba(11, 14, 24, 0.82) 68%);
pointer-events: none;
}
html[data-theme="light"] .funds-ac-circle-overlay {
background: radial-gradient(circle at 50% 55%, rgba(240, 244, 249, 0.45) 0%, rgba(240, 244, 249, 0.88) 68%);
}
.funds-ac-circle-name {
font-size: 0.72rem;
font-weight: 600;
letter-spacing: 0.02em;
max-width: 88px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.funds-ac-circle-amt {
font-size: 0.78rem;
font-weight: 600;
font-variant-numeric: tabular-nums;
color: var(--text);
}
.funds-ac-circle-badge {
font-size: 0.66rem;
padding: 2px 8px;
border-radius: 999px;
border: 1px solid var(--border-soft);
color: var(--muted);
text-align: center;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.funds-ac-circle-badge.is-ok {
color: var(--green);
border-color: rgba(34, 197, 94, 0.35);
}
.funds-empty {
color: var(--muted);
@@ -4557,6 +4610,100 @@ body.hub-page-ai #page-ai {
padding: 12px 0;
}
.funds-fullscreen {
position: fixed;
inset: 0;
z-index: 160;
background: var(--fs-scrim);
backdrop-filter: blur(6px);
overflow: auto;
padding: 16px 20px 24px;
}
.funds-fullscreen.hidden {
display: none !important;
}
.funds-fs-backdrop {
position: fixed;
inset: 0;
z-index: 0;
border: none;
padding: 0;
margin: 0;
background: transparent;
cursor: pointer;
}
.funds-fs-panel {
position: relative;
z-index: 1;
max-width: min(1200px, 96vw);
margin: 0 auto;
background: var(--panel);
border: 1px solid var(--border-soft);
border-radius: var(--radius);
padding: 16px 18px 20px;
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.funds-fs-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
margin-bottom: 14px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border-soft);
}
.funds-fs-title {
margin: 0;
font-size: 1.15rem;
font-weight: 600;
}
.funds-fs-sub {
margin: 4px 0 0;
font-size: 0.76rem;
color: var(--muted);
}
.funds-fs-summary {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 10px;
margin-bottom: 14px;
}
.funds-fs-stat {
background: var(--inset-surface);
border: 1px solid var(--border-soft);
border-radius: 8px;
padding: 10px 12px;
display: flex;
flex-direction: column;
gap: 4px;
}
.funds-fs-stat .k {
font-size: 0.72rem;
color: var(--muted);
}
.funds-fs-stat .v {
font-size: 1rem;
font-weight: 600;
font-variant-numeric: tabular-nums;
}
.funds-fs-stat .v.pos {
color: var(--green);
}
.funds-fs-stat .v.neg {
color: var(--red);
}
.funds-fs-chart-host {
height: min(52vh, 420px);
min-height: 260px;
border: 1px solid var(--border-soft);
border-radius: var(--radius);
background: var(--chart-surface, var(--panel));
overflow: hidden;
}
body.funds-fullscreen-open {
overflow: hidden;
}
/* —— 币种档案 —— */
.archive-toolbar {
flex-wrap: wrap;