feat(hub): add symbol archive with permanent 5m klines
Add /archive page, hub_symbol_archive.db, trade overlay, 4h background sync, and instance /api/hub/trades/archive. Document in hub-symbol-archive-kline.md with cross-links. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3852,3 +3852,193 @@ body.hub-page-ai #page-ai {
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
/* —— 币种档案 —— */
|
||||
.archive-toolbar {
|
||||
flex-wrap: wrap;
|
||||
gap: 10px 14px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.archive-field {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 0.82rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
.archive-field select,
|
||||
.archive-field input {
|
||||
min-width: 120px;
|
||||
padding: 6px 8px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border-soft);
|
||||
background: var(--inset-surface);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
}
|
||||
.archive-layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
|
||||
gap: 14px;
|
||||
min-height: 520px;
|
||||
}
|
||||
.archive-list-panel {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: var(--radius);
|
||||
overflow: auto;
|
||||
max-height: calc(100vh - 200px);
|
||||
}
|
||||
.archive-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.archive-row {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
grid-template-rows: auto auto;
|
||||
gap: 2px 8px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
padding: 10px 12px;
|
||||
border: none;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
background: transparent;
|
||||
color: var(--text);
|
||||
cursor: pointer;
|
||||
font-family: var(--font);
|
||||
}
|
||||
.archive-row:hover,
|
||||
.archive-row.is-active {
|
||||
background: var(--inset-surface);
|
||||
}
|
||||
.archive-row-sym {
|
||||
font-weight: 600;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.archive-row-ex {
|
||||
font-size: 0.75rem;
|
||||
color: var(--muted);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.archive-row-stat {
|
||||
grid-column: 1 / -1;
|
||||
font-size: 0.8rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
.archive-row-meta {
|
||||
font-size: 0.72rem;
|
||||
color: var(--accent);
|
||||
align-self: start;
|
||||
}
|
||||
.archive-detail-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
.archive-detail-head {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: baseline;
|
||||
gap: 8px 16px;
|
||||
}
|
||||
.archive-detail-head h2 {
|
||||
margin: 0;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
.archive-detail-stats {
|
||||
font-size: 0.82rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
.archive-chart-toolbar {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.archive-tf-tabs {
|
||||
display: inline-flex;
|
||||
gap: 4px;
|
||||
}
|
||||
.archive-tf-btn {
|
||||
padding: 5px 10px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border-soft);
|
||||
background: var(--inset-surface);
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
font-family: var(--font);
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
.archive-tf-btn.is-active {
|
||||
color: var(--text);
|
||||
border-color: var(--accent);
|
||||
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
||||
}
|
||||
.archive-chart-host {
|
||||
height: 360px;
|
||||
min-height: 280px;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: var(--radius);
|
||||
background: var(--panel);
|
||||
overflow: hidden;
|
||||
}
|
||||
.archive-trades {
|
||||
overflow: auto;
|
||||
max-height: 280px;
|
||||
border: 1px solid var(--border-soft);
|
||||
border-radius: var(--radius);
|
||||
background: var(--panel);
|
||||
}
|
||||
.archive-trades-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.78rem;
|
||||
}
|
||||
.archive-trades-table th,
|
||||
.archive-trades-table td {
|
||||
padding: 6px 8px;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
text-align: left;
|
||||
}
|
||||
.archive-trades-table th {
|
||||
color: var(--muted);
|
||||
font-weight: 500;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: var(--panel);
|
||||
}
|
||||
.archive-trade-row {
|
||||
cursor: pointer;
|
||||
}
|
||||
.archive-trade-row.is-active {
|
||||
background: var(--inset-surface);
|
||||
}
|
||||
.archive-trades-table td.pos {
|
||||
color: #22c55e;
|
||||
}
|
||||
.archive-trades-table td.neg {
|
||||
color: #ef4444;
|
||||
}
|
||||
.archive-tag-select,
|
||||
.archive-note-input {
|
||||
width: 100%;
|
||||
max-width: 140px;
|
||||
padding: 4px 6px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--border-soft);
|
||||
background: var(--inset-surface);
|
||||
color: var(--text);
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
.archive-empty {
|
||||
padding: 16px;
|
||||
color: var(--muted);
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.archive-layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.archive-list-panel {
|
||||
max-height: 240px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user