Commit ·
b800b0f
1
Parent(s): 19c742f
Add P&L panel, align market data columns, resize layout
Browse files- static/market-panel.js +12 -11
- static/scan/index.html +48 -14
static/market-panel.js
CHANGED
|
@@ -35,23 +35,24 @@
|
|
| 35 |
var row = document.createElement('div');
|
| 36 |
row.className = 'market-row';
|
| 37 |
row.dataset.sym = sym;
|
| 38 |
-
row.style.display = '
|
| 39 |
-
row.style.
|
| 40 |
row.style.gap = '8px';
|
|
|
|
| 41 |
var rm = isExtra
|
| 42 |
? '<span class="rm" style="cursor:pointer;color:#8b949e;font-size:14px;width:14px;text-align:right;flex-shrink:0;" title="Remove">✕</span>'
|
| 43 |
: '<span style="width:14px;flex-shrink:0;"></span>';
|
| 44 |
var mstyle = 'text-align:right;font-family:monospace;font-size:12px;';
|
| 45 |
row.innerHTML =
|
| 46 |
-
'<span class="sym"
|
| 47 |
-
'<span class="px" style="
|
| 48 |
-
'<span class="chg" style="
|
| 49 |
-
'<span class="chg7" style="
|
| 50 |
-
'<span class="chg30" style="
|
| 51 |
-
'<span class="rsi" style="
|
| 52 |
-
'<span class="zsc" style="
|
| 53 |
-
'<span class="basis" style="
|
| 54 |
-
'<span class="sig" style="
|
| 55 |
rm;
|
| 56 |
c.appendChild(row);
|
| 57 |
if (isExtra) {
|
|
|
|
| 35 |
var row = document.createElement('div');
|
| 36 |
row.className = 'market-row';
|
| 37 |
row.dataset.sym = sym;
|
| 38 |
+
row.style.display = 'grid';
|
| 39 |
+
row.style.gridTemplateColumns = '50px 1fr 60px 60px 60px 50px 60px 70px 110px 14px';
|
| 40 |
row.style.gap = '8px';
|
| 41 |
+
row.style.alignItems = 'center';
|
| 42 |
var rm = isExtra
|
| 43 |
? '<span class="rm" style="cursor:pointer;color:#8b949e;font-size:14px;width:14px;text-align:right;flex-shrink:0;" title="Remove">✕</span>'
|
| 44 |
: '<span style="width:14px;flex-shrink:0;"></span>';
|
| 45 |
var mstyle = 'text-align:right;font-family:monospace;font-size:12px;';
|
| 46 |
row.innerHTML =
|
| 47 |
+
'<span class="sym">' + sym + '</span>' +
|
| 48 |
+
'<span class="px" style="text-align:right;font-family:monospace;font-size:13px;">—</span>' +
|
| 49 |
+
'<span class="chg" style="' + mstyle + '"></span>' +
|
| 50 |
+
'<span class="chg7" style="' + mstyle + '"></span>' +
|
| 51 |
+
'<span class="chg30" style="' + mstyle + '"></span>' +
|
| 52 |
+
'<span class="rsi" style="' + mstyle + '"></span>' +
|
| 53 |
+
'<span class="zsc" style="' + mstyle + '"></span>' +
|
| 54 |
+
'<span class="basis" style="' + mstyle + '"></span>' +
|
| 55 |
+
'<span class="sig" style="text-align:right;font-size:11px;"></span>' +
|
| 56 |
rm;
|
| 57 |
c.appendChild(row);
|
| 58 |
if (isExtra) {
|
static/scan/index.html
CHANGED
|
@@ -97,12 +97,14 @@
|
|
| 97 |
margin-bottom: 20px;
|
| 98 |
}
|
| 99 |
.market-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
|
| 100 |
-
.market-row { display:
|
| 101 |
.market-ts { font-size: 11px; color: #8b949e; margin-top: 10px; }
|
| 102 |
.market-hdr {
|
| 103 |
-
display:
|
|
|
|
|
|
|
| 104 |
letter-spacing: 0.5px; margin-bottom: 8px; text-transform: uppercase;
|
| 105 |
-
font-weight: 700;
|
| 106 |
}
|
| 107 |
.market-hdr .hdr-coin { min-width: 50px; }
|
| 108 |
.market-hdr .hdr-price { flex: 1; text-align: right; }
|
|
@@ -300,19 +302,20 @@
|
|
| 300 |
</div>
|
| 301 |
|
| 302 |
<!-- Live Market Data (shared module) -->
|
| 303 |
-
<div class="market-
|
|
|
|
| 304 |
<div class="regime-card-title">Market Data</div>
|
| 305 |
<div class="market-hdr">
|
| 306 |
-
<span
|
| 307 |
-
<span style="
|
| 308 |
-
<span style="
|
| 309 |
-
<span style="
|
| 310 |
-
<span style="
|
| 311 |
-
<span style="
|
| 312 |
-
<span style="
|
| 313 |
-
<span style="
|
| 314 |
-
<span style="
|
| 315 |
-
<span
|
| 316 |
</div>
|
| 317 |
<div class="market-list" id="market-list"></div>
|
| 318 |
<div class="market-add-row">
|
|
@@ -322,6 +325,37 @@
|
|
| 322 |
<div class="market-ts" id="market-ts">Loading…</div>
|
| 323 |
</div>
|
| 324 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 325 |
<!-- Market Regime Banner -->
|
| 326 |
<div id="regime-banner" style="display: none; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; border: 2px solid #30363d; background: #1e2329;">
|
| 327 |
<div style="display: flex; align-items: center; gap: 12px;">
|
|
|
|
| 97 |
margin-bottom: 20px;
|
| 98 |
}
|
| 99 |
.market-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
|
| 100 |
+
.market-row { display: grid; grid-template-columns: 50px 1fr 60px 60px 60px 50px 60px 70px 110px 14px; gap: 8px; align-items: center; }
|
| 101 |
.market-ts { font-size: 11px; color: #8b949e; margin-top: 10px; }
|
| 102 |
.market-hdr {
|
| 103 |
+
display: grid;
|
| 104 |
+
grid-template-columns: 50px 1fr 60px 60px 60px 50px 60px 70px 110px 14px;
|
| 105 |
+
gap: 8px; font-size: 12px; color: #f0b90b;
|
| 106 |
letter-spacing: 0.5px; margin-bottom: 8px; text-transform: uppercase;
|
| 107 |
+
font-weight: 700; align-items: center;
|
| 108 |
}
|
| 109 |
.market-hdr .hdr-coin { min-width: 50px; }
|
| 110 |
.market-hdr .hdr-price { flex: 1; text-align: right; }
|
|
|
|
| 302 |
</div>
|
| 303 |
|
| 304 |
<!-- Live Market Data (shared module) -->
|
| 305 |
+
<div class="market-data-wrap" style="display:flex;gap:20px;flex-wrap:wrap;margin-bottom:20px;">
|
| 306 |
+
<div class="market-card" style="flex:1 1 auto;min-width:600px;margin-bottom:0;">
|
| 307 |
<div class="regime-card-title">Market Data</div>
|
| 308 |
<div class="market-hdr">
|
| 309 |
+
<span>Coin</span>
|
| 310 |
+
<span style="text-align:right;">Price</span>
|
| 311 |
+
<span style="text-align:right;">24h</span>
|
| 312 |
+
<span style="text-align:right;">1w</span>
|
| 313 |
+
<span style="text-align:right;">1m</span>
|
| 314 |
+
<span style="text-align:right;" data-help="rsi">RSI</span>
|
| 315 |
+
<span style="text-align:right;" data-help="zscore">Z-Score</span>
|
| 316 |
+
<span style="text-align:right;" data-help="basis">Basis %</span>
|
| 317 |
+
<span style="text-align:right;" data-help="signal">Signal</span>
|
| 318 |
+
<span></span>
|
| 319 |
</div>
|
| 320 |
<div class="market-list" id="market-list"></div>
|
| 321 |
<div class="market-add-row">
|
|
|
|
| 325 |
<div class="market-ts" id="market-ts">Loading…</div>
|
| 326 |
</div>
|
| 327 |
|
| 328 |
+
<div class="pnl-card" style="flex:0 0 300px;max-width:100%;background:#1e2329;border:2px solid #30363d;border-radius:12px;padding:16px 18px;">
|
| 329 |
+
<div class="regime-card-title">Blind Monkey's Profit and Loss</div>
|
| 330 |
+
<div style="margin-top:12px;font-size:13px;">
|
| 331 |
+
<div style="display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #21262d;color:#8b949e;">
|
| 332 |
+
<span>Total Portfolio Value</span>
|
| 333 |
+
<span style="font-family:monospace;color:#e6edf3;">—</span>
|
| 334 |
+
</div>
|
| 335 |
+
<div style="display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #21262d;color:#8b949e;">
|
| 336 |
+
<span>Total P&L</span>
|
| 337 |
+
<span style="font-family:monospace;color:#e6edf3;">—</span>
|
| 338 |
+
</div>
|
| 339 |
+
<div style="display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #21262d;color:#8b949e;">
|
| 340 |
+
<span>1 Day P&L</span>
|
| 341 |
+
<span style="font-family:monospace;color:#e6edf3;">—</span>
|
| 342 |
+
</div>
|
| 343 |
+
<div style="display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #21262d;color:#8b949e;">
|
| 344 |
+
<span>1 Week P&L</span>
|
| 345 |
+
<span style="font-family:monospace;color:#e6edf3;">—</span>
|
| 346 |
+
</div>
|
| 347 |
+
<div style="display:flex;justify-content:space-between;padding:8px 0;color:#8b949e;">
|
| 348 |
+
<span>1 Month P&L</span>
|
| 349 |
+
<span style="font-family:monospace;color:#e6edf3;">—</span>
|
| 350 |
+
</div>
|
| 351 |
+
<div style="margin-top:14px;font-size:11px;color:#484f58;text-align:center;">
|
| 352 |
+
Awaiting Gate API connection
|
| 353 |
+
</div>
|
| 354 |
+
</div>
|
| 355 |
+
</div>
|
| 356 |
+
|
| 357 |
+
</div>
|
| 358 |
+
|
| 359 |
<!-- Market Regime Banner -->
|
| 360 |
<div id="regime-banner" style="display: none; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; border: 2px solid #30363d; background: #1e2329;">
|
| 361 |
<div style="display: flex; align-items: center; gap: 12px;">
|