- Click any trade row in history table to open detail modal - Modal shows 6 sections: 概览, 时间, 价差, 手续费, 多仓, 空仓 - Entries and exits displayed with 6 decimal precision - Fee entry/exit and total fee displayed - Open/close timestamps with full date-time format - Duration, scale count, total amount, exit reason - Orders sub-table if available - Escape key and overlay click to close
240 lines
5.6 KiB
CSS
240 lines
5.6 KiB
CSS
/* ============================================================
|
|
Exchange Monitor Dashboard — Dark Theme
|
|
============================================================ */
|
|
|
|
:root {
|
|
--bg: #0d1117;
|
|
--card: #161b22;
|
|
--border: #30363d;
|
|
--text: #c9d1d9;
|
|
--text-dim: #8b949e;
|
|
--accent: #58a6ff;
|
|
--green: #3fb950;
|
|
--red: #f85149;
|
|
--yellow: #d29922;
|
|
--blue: #58a6ff;
|
|
}
|
|
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-size: 14px;
|
|
line-height: 1.5;
|
|
min-height: 100vh;
|
|
}
|
|
|
|
#app { max-width: 1440px; margin: 0 auto; padding: 16px; }
|
|
|
|
/* Header */
|
|
header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 12px 16px;
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
header h1 { font-size: 18px; font-weight: 600; }
|
|
.header-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
|
|
.sep { color: var(--border); }
|
|
.status-offline { color: var(--red); }
|
|
.status-online { color: var(--green); }
|
|
|
|
/* Grid layout */
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 12px;
|
|
}
|
|
.card-wide { grid-column: 1 / -1; }
|
|
|
|
/* Cards */
|
|
.card {
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 12px;
|
|
}
|
|
|
|
.card h2 {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
color: var(--text-dim);
|
|
margin-bottom: 10px;
|
|
padding-bottom: 8px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
/* Stats row */
|
|
.stats-row {
|
|
display: flex;
|
|
gap: 16px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.stat {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
min-width: 60px;
|
|
}
|
|
.stat label { font-size: 11px; color: var(--text-dim); margin-bottom: 2px; }
|
|
.stat span { font-size: 20px; font-weight: 700; }
|
|
.pct-green { color: var(--green); }
|
|
.pct-red { color: var(--red); }
|
|
.pct-gray { color: var(--text-dim); }
|
|
.pct-yellow { color: var(--yellow); }
|
|
.pct-blue { color: var(--blue); }
|
|
|
|
/* Connection status dots */
|
|
#conn-details { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
|
#conn-detail { font-size: 11px; white-space: nowrap; }
|
|
#conn-detail span { margin-right: 4px; font-size: 10px; }
|
|
|
|
/* Tables */
|
|
.table-wrap {
|
|
overflow-x: auto;
|
|
max-height: 320px;
|
|
overflow-y: auto;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 13px;
|
|
}
|
|
th {
|
|
text-align: left;
|
|
padding: 6px 8px;
|
|
color: var(--text-dim);
|
|
font-weight: 500;
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
position: sticky;
|
|
top: 0;
|
|
background: var(--card);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
td {
|
|
padding: 5px 8px;
|
|
border-bottom: 1px solid rgba(48, 54, 61, 0.5);
|
|
white-space: nowrap;
|
|
}
|
|
tr:hover td { background: rgba(88, 166, 255, 0.05); }
|
|
.loading { text-align: center; color: var(--text-dim); padding: 20px !important; }
|
|
|
|
.text-green { color: var(--green); }
|
|
.text-red { color: var(--red); }
|
|
.text-yellow { color: var(--yellow); }
|
|
.text-dim { color: var(--text-dim); }
|
|
.text-right { text-align: right; }
|
|
|
|
/* Chart controls */
|
|
.chart-controls {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-bottom: 10px;
|
|
}
|
|
.chart-controls select {
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
padding: 4px 8px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
.chart-container {
|
|
position: relative;
|
|
height: 300px;
|
|
}
|
|
|
|
/* Scrollbar */
|
|
::-webkit-scrollbar { width: 6px; height: 6px; }
|
|
::-webkit-scrollbar-track { background: transparent; }
|
|
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
|
::-webkit-scrollbar-thumb:hover { background: #484f58; }
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
.grid { grid-template-columns: 1fr; }
|
|
header { flex-direction: column; gap: 8px; }
|
|
.stats-row { justify-content: center; }
|
|
}
|
|
|
|
/* Trade Detail Modal */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0; left: 0; right: 0; bottom: 0;
|
|
background: rgba(0,0,0,0.7);
|
|
z-index: 1000;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
padding: 40px 16px;
|
|
overflow-y: auto;
|
|
}
|
|
.modal-content {
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
max-width: 700px;
|
|
width: 100%;
|
|
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
|
|
}
|
|
.modal-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 16px 20px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.modal-header h2 { font-size: 16px; margin: 0; padding: 0; border: none; color: var(--text); }
|
|
.modal-close {
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-dim);
|
|
font-size: 20px;
|
|
cursor: pointer;
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
line-height: 1;
|
|
}
|
|
.modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }
|
|
#trade-detail-body { padding: 0; }
|
|
.detail-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 0;
|
|
}
|
|
.detail-section {
|
|
padding: 14px 20px;
|
|
border-bottom: 1px solid rgba(48,54,61,0.4);
|
|
}
|
|
.detail-section:last-child { border-bottom: none; }
|
|
.detail-section-full { grid-column: 1 / -1; }
|
|
.detail-section h3 {
|
|
font-size: 12px;
|
|
color: var(--text-dim);
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.detail-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 3px 0;
|
|
font-size: 13px;
|
|
}
|
|
.detail-row .label { color: var(--text-dim); }
|
|
.detail-row .value { font-weight: 500; }
|
|
.detail-orders { width: 100%; font-size: 12px; }
|
|
.detail-orders th { background: var(--bg); font-size: 10px; }
|
|
.detail-orders td { padding: 4px 6px; }
|