Spaces:
Running
Running
Jimin Huang
commited on
Commit
·
03e958a
1
Parent(s):
953e8bb
Change settings
Browse files- src/views/LiveView.vue +145 -148
src/views/LiveView.vue
CHANGED
|
@@ -436,179 +436,176 @@ watch(
|
|
| 436 |
</script>
|
| 437 |
|
| 438 |
<!-- Global brand tokens (unscoped to ensure cascade) -->
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
--
|
| 447 |
-
|
| 448 |
-
--bronze: #CD7F32;
|
| 449 |
-
|
| 450 |
-
/* Finance tints */
|
| 451 |
-
--pos-bg: #E9F7EF;
|
| 452 |
-
--pos-fg: #0e7a3a;
|
| 453 |
-
--pos-br: #d7f0e0;
|
| 454 |
-
|
| 455 |
-
--neg-bg: #FBEAEA;
|
| 456 |
-
--neg-fg: #B91C1C;
|
| 457 |
-
--neg-br: #F3DADA;
|
| 458 |
-
|
| 459 |
-
--card-bg-1: #ffffff;
|
| 460 |
-
--card-bg-2: #f9faff;
|
| 461 |
}
|
| 462 |
-
</style>
|
| 463 |
|
| 464 |
-
|
| 465 |
-
.
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
display: flex; align-items: center; justify-content: space-between; gap: 16px;
|
| 471 |
-
padding: 12px 0 14px;
|
| 472 |
-
background: #ffffff; color: #0f172a;
|
| 473 |
-
border-bottom: 2px solid rgba(var(--ama-end), .15);
|
| 474 |
backdrop-filter: blur(10px);
|
| 475 |
}
|
| 476 |
-
.toolbar__right
|
| 477 |
|
| 478 |
-
/* Asset tabs */
|
| 479 |
-
.asset-tabs
|
| 480 |
-
display:
|
| 481 |
-
|
| 482 |
-
box-shadow:
|
| 483 |
}
|
| 484 |
-
.asset-tab
|
| 485 |
-
min-width:
|
| 486 |
-
border-radius:
|
| 487 |
-
background:
|
| 488 |
-
transition:
|
| 489 |
}
|
| 490 |
-
.asset-tab:hover
|
| 491 |
-
.asset-tab.is-active
|
| 492 |
-
color
|
| 493 |
background: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 494 |
box-shadow: 0 0 0 1px rgba(var(--ama-end), .22), 0 8px 18px rgba(var(--ama-end), .22);
|
| 495 |
}
|
| 496 |
|
| 497 |
-
/*
|
| 498 |
-
.mode-switch
|
| 499 |
-
display:
|
| 500 |
-
border-radius:
|
| 501 |
-
border:
|
| 502 |
-
box-shadow:
|
| 503 |
}
|
| 504 |
-
.mode-switch__btn
|
| 505 |
-
height:
|
| 506 |
-
|
| 507 |
-
transition:
|
| 508 |
}
|
| 509 |
-
.mode-switch__btn:not(.is-active):hover
|
| 510 |
-
.mode-switch__btn.is-active
|
| 511 |
-
color
|
| 512 |
background: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 513 |
box-shadow: inset 0 -1px 0 rgba(255,255,255,.2);
|
| 514 |
}
|
| 515 |
|
| 516 |
-
/*
|
| 517 |
-
.panel
|
| 518 |
-
.panel--chart
|
| 519 |
-
.panel--cards
|
| 520 |
-
|
| 521 |
-
/*
|
| 522 |
-
.empty
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
.cards-grid-f1 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
|
| 526 |
-
|
| 527 |
-
/* card base with subtle AMA hue */
|
| 528 |
-
.card-f1 {
|
| 529 |
-
position: relative;
|
| 530 |
-
display: grid;
|
| 531 |
-
grid-template-rows: auto auto auto auto auto;
|
| 532 |
-
gap: 10px;
|
| 533 |
-
padding: 18px 18px 20px;
|
| 534 |
-
min-height: 230px;
|
| 535 |
-
border-radius: 16px;
|
| 536 |
-
background: linear-gradient(145deg,var(--card-bg-1),var(--card-bg-2) 75%,var(--card-bg-1) 100%);
|
| 537 |
-
border: 1px solid rgba(0,0,0,0.05);
|
| 538 |
-
box-shadow: 0 2px 10px rgba(var(--ama-start), .05), 0 6px 20px rgba(var(--ama-end), .08);
|
| 539 |
-
color: #0f172a;
|
| 540 |
-
transition: transform .25s ease, box-shadow .25s ease;
|
| 541 |
}
|
| 542 |
-
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
.card-f1
|
| 548 |
-
|
| 549 |
-
|
| 550 |
-
|
| 551 |
-
|
| 552 |
-
|
| 553 |
-
|
| 554 |
-
|
| 555 |
-
|
| 556 |
-
.
|
| 557 |
-
.
|
| 558 |
-
|
| 559 |
-
|
| 560 |
-
.
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
.
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
.kpi__pill{
|
| 568 |
-
display:inline-block; font-size:12px; font-weight:800; padding:4px 10px; border-radius: 999px;
|
| 569 |
-
border:1px solid #E7ECF3; background:#F6F8FB; color:#0f172a;
|
| 570 |
}
|
| 571 |
-
.
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
/* Quality row */
|
| 576 |
-
.quality{
|
| 577 |
-
display:grid; grid-template-columns: 1fr 1fr; gap:12px;
|
| 578 |
-
padding: 2px 0 0;
|
| 579 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 580 |
.qitem{ display:flex; align-items:baseline; gap:8px; }
|
| 581 |
-
.qitem__label{ font-size:12px; color
|
| 582 |
-
.qitem__value{ font-size:14px; font-weight:800; color
|
| 583 |
-
.qitem__value.strong{ color
|
| 584 |
-
.qitem__value.dd{ color
|
| 585 |
-
|
| 586 |
-
/*
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 590 |
}
|
| 591 |
-
.
|
| 592 |
-
|
| 593 |
-
|
| 594 |
-
.
|
| 595 |
-
.
|
| 596 |
-
|
| 597 |
-
/* Bar vs B&H */
|
| 598 |
-
.bar { height: 6px; border-radius: 999px; background: #F2F4F8; overflow: hidden; border: 1px solid #E7ECF3; margin: 2px 0 8px; }
|
| 599 |
-
.bar span { display: block; height: 100%; background: linear-gradient(90deg,#16a34a,#22c55e); width: var(--bar, 40%); transition: width .5s ease; }
|
| 600 |
-
.bar.neg span { background: linear-gradient(90deg,#ef4444,#dc2626); }
|
| 601 |
-
|
| 602 |
-
/* Meta row */
|
| 603 |
-
.meta { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
|
| 604 |
-
.chip.gap{
|
| 605 |
display:inline-flex; align-items:center; gap:6px;
|
| 606 |
font-size:12px; font-weight:800; padding:4px 8px; border-radius:999px;
|
| 607 |
-
background:#F6F8FB; color
|
| 608 |
}
|
| 609 |
-
.chip.
|
| 610 |
-
.chip.
|
| 611 |
.chip__label{ opacity:.8; }
|
| 612 |
.chip__value{ font-variant-numeric: tabular-nums; }
|
| 613 |
-
.eod{ font-size:12px; color
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 614 |
</style>
|
|
|
|
| 436 |
</script>
|
| 437 |
|
| 438 |
<!-- Global brand tokens (unscoped to ensure cascade) -->
|
| 439 |
+
<!-- Paste this inside your Live view component as the full style -->
|
| 440 |
+
<style scoped>
|
| 441 |
+
/* ======= Page ======= */
|
| 442 |
+
.live{
|
| 443 |
+
max-width:1280px;
|
| 444 |
+
margin:0 auto;
|
| 445 |
+
padding:18px 24px 64px;
|
| 446 |
+
color:var(--ink-900);
|
| 447 |
+
background: radial-gradient(ellipse at 30% -10%, #fdfdfd 0%, var(--surface-2) 60%, var(--surface-0) 100%);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 448 |
}
|
|
|
|
| 449 |
|
| 450 |
+
/* ======= Toolbar (assets + mode) ======= */
|
| 451 |
+
.toolbar{
|
| 452 |
+
position:sticky; top:0; z-index:10;
|
| 453 |
+
display:flex; align-items:center; justify-content:space-between; gap:16px;
|
| 454 |
+
padding:12px 0 14px; background:var(--surface-0);
|
| 455 |
+
border-bottom:2px solid rgba(var(--ama-end), .15);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 456 |
backdrop-filter: blur(10px);
|
| 457 |
}
|
| 458 |
+
.toolbar__right{ display:flex; align-items:center; gap:12px; }
|
| 459 |
|
| 460 |
+
/* ======= Asset tabs ======= */
|
| 461 |
+
.asset-tabs{
|
| 462 |
+
display:inline-flex; gap:6px; padding:4px;
|
| 463 |
+
border-radius:12px; background:var(--surface-0);
|
| 464 |
+
border:1px solid var(--bd-subtle); box-shadow:0 2px 8px rgba(0,0,0,.04);
|
| 465 |
}
|
| 466 |
+
.asset-tab{
|
| 467 |
+
min-width:54px; height:32px; padding:0 10px;
|
| 468 |
+
border-radius:8px; border:1px solid transparent;
|
| 469 |
+
background:transparent; color:var(--ink-900);
|
| 470 |
+
font-weight:800; letter-spacing:.02em; cursor:pointer; transition:all .2s ease;
|
| 471 |
}
|
| 472 |
+
.asset-tab:hover{ color:rgb(var(--ama-end)); border-color:rgba(var(--ama-end), .28); }
|
| 473 |
+
.asset-tab.is-active{
|
| 474 |
+
color:#fff; border:none;
|
| 475 |
background: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 476 |
box-shadow: 0 0 0 1px rgba(var(--ama-end), .22), 0 8px 18px rgba(var(--ama-end), .22);
|
| 477 |
}
|
| 478 |
|
| 479 |
+
/* ======= Mode switch ($ / %) ======= */
|
| 480 |
+
.mode-switch{
|
| 481 |
+
display:inline-grid; grid-template-columns:1fr 1fr;
|
| 482 |
+
border-radius:12px; overflow:hidden;
|
| 483 |
+
border:1px solid var(--bd-subtle); background:var(--surface-0);
|
| 484 |
+
box-shadow:0 2px 8px rgba(0,0,0,.04);
|
| 485 |
}
|
| 486 |
+
.mode-switch__btn{
|
| 487 |
+
height:32px; min-width:44px; padding:0 12px;
|
| 488 |
+
font-weight:800; letter-spacing:.02em; border:none; background:transparent;
|
| 489 |
+
color:var(--ink-900); cursor:pointer; transition:all .2s ease;
|
| 490 |
}
|
| 491 |
+
.mode-switch__btn:not(.is-active):hover{ color:rgb(var(--ama-end)); background:#f8fafc; }
|
| 492 |
+
.mode-switch__btn.is-active{
|
| 493 |
+
color:#fff;
|
| 494 |
background: linear-gradient(90deg, rgb(var(--ama-start)), rgb(var(--ama-end)));
|
| 495 |
box-shadow: inset 0 -1px 0 rgba(255,255,255,.2);
|
| 496 |
}
|
| 497 |
|
| 498 |
+
/* ======= Panels ======= */
|
| 499 |
+
.panel{ background:var(--surface-0); border:1px solid var(--bd-soft); border-radius:16px; margin-top:16px; }
|
| 500 |
+
.panel--chart{ padding:10px; }
|
| 501 |
+
.panel--cards{ padding:16px; }
|
| 502 |
+
|
| 503 |
+
/* ======= Empty State ======= */
|
| 504 |
+
.empty{
|
| 505 |
+
padding:20px; border:1px dashed var(--bd-soft); border-radius:12px;
|
| 506 |
+
color:var(--ink-600); font-size:.95rem; background:var(--surface-0); text-align:center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 507 |
}
|
| 508 |
+
|
| 509 |
+
/* ======= Grid ======= */
|
| 510 |
+
.cards-grid-f1{ display:grid; gap:14px; grid-template-columns:repeat(auto-fit, minmax(260px,1fr)); }
|
| 511 |
+
|
| 512 |
+
/* ======= Cards (Tournament) ======= */
|
| 513 |
+
.card-f1{
|
| 514 |
+
position:relative;
|
| 515 |
+
display:grid; grid-template-rows:auto auto auto auto auto; gap:10px;
|
| 516 |
+
padding:18px 18px 20px; min-height:230px; border-radius:16px;
|
| 517 |
+
background: linear-gradient(145deg, var(--surface-0), var(--surface-2) 75%, var(--surface-0) 100%);
|
| 518 |
+
border:1px solid rgba(0,0,0,.05);
|
| 519 |
+
box-shadow:0 2px 10px rgba(var(--ama-start), .05), 0 6px 20px rgba(var(--ama-end), .08);
|
| 520 |
+
color:var(--ink-900); transition: transform .25s ease, box-shadow .25s ease;
|
| 521 |
+
}
|
| 522 |
+
.card-f1:hover{ transform: translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.08); }
|
| 523 |
+
.card-f1.bh{ border-style:dashed; }
|
| 524 |
+
|
| 525 |
+
/* Podium metals (attach .gold/.silver/.bronze) */
|
| 526 |
+
.card-f1.gold{
|
| 527 |
+
border-color:var(--gold);
|
| 528 |
+
box-shadow:0 0 0 1px rgba(212,175,55,.32), 0 10px 28px rgba(212,175,55,.18);
|
| 529 |
+
}
|
| 530 |
+
.card-f1.silver{
|
| 531 |
+
border-color:var(--silver);
|
| 532 |
+
box-shadow:0 0 0 1px rgba(192,192,192,.28), 0 10px 28px rgba(192,192,192,.14);
|
|
|
|
|
|
|
|
|
|
| 533 |
}
|
| 534 |
+
.card-f1.bronze{
|
| 535 |
+
border-color:var(--bronze);
|
| 536 |
+
box-shadow:0 0 0 1px rgba(205,127,50,.28), 0 10px 28px rgba(205,127,50,.14);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 537 |
}
|
| 538 |
+
|
| 539 |
+
/* Optional thin ribbon bar on podium cards */
|
| 540 |
+
.podium-ribbon{ position:absolute; top:0; left:0; right:0; height:6px; border-top-left-radius:16px; border-top-right-radius:16px; }
|
| 541 |
+
.card-f1.gold .podium-ribbon{ background: linear-gradient(90deg, #f6e27a, var(--gold)); }
|
| 542 |
+
.card-f1.silver .podium-ribbon{ background: linear-gradient(90deg, #e9eef2, var(--silver)); }
|
| 543 |
+
.card-f1.bronze .podium-ribbon{ background: linear-gradient(90deg, #f0c6a1, var(--bronze)); }
|
| 544 |
+
|
| 545 |
+
/* ======= Card: Head ======= */
|
| 546 |
+
.head{ display:grid; grid-template-columns:44px minmax(0,1fr); align-items:center; gap:12px; }
|
| 547 |
+
.logo{ width:44px; height:44px; border-radius:12px; background:#f3f4f6; display:grid; place-items:center; overflow:hidden; border:1px solid #E5E7EB; }
|
| 548 |
+
.logo img{ width:100%; height:100%; object-fit:contain; }
|
| 549 |
+
.logo__fallback{ width:60%; height:60%; border-radius:6px; background:#e5e7eb; }
|
| 550 |
+
.names{ min-width:0; }
|
| 551 |
+
.agent{ font-size:16px; font-weight:900; letter-spacing:.02em; text-transform:uppercase; color:var(--ink-900); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
| 552 |
+
.model{ font-size:11px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; color:#64748b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
| 553 |
+
|
| 554 |
+
/* ======= KPIs (Net Value + P&L) ======= */
|
| 555 |
+
.kpis{ display:grid; grid-template-columns:1fr auto; align-items:end; gap:12px; }
|
| 556 |
+
.kpi__label{ font-size:12px; color:var(--ink-600); }
|
| 557 |
+
.kpi__value{ font-size: clamp(18px, 2.2vw, 25px); font-weight:700; letter-spacing:-.01em; color:var(--ink-900); }
|
| 558 |
+
.kpi__pill{
|
| 559 |
+
display:inline-block; font-size:12px; font-weight:800; padding:4px 10px; border-radius:999px;
|
| 560 |
+
border:1px solid var(--bd-soft); background:#F6F8FB; color:var(--ink-900);
|
| 561 |
+
}
|
| 562 |
+
.kpi__pill.pos{ color:var(--pos-fg); background:var(--pos-bg); border-color:var(--pos-br); }
|
| 563 |
+
.kpi__pill.neg{ color:var(--neg-fg); background:var(--neg-bg); border-color:var(--neg-br); }
|
| 564 |
+
|
| 565 |
+
/* ======= Quality (Sharpe, MaxDD) ======= */
|
| 566 |
+
.quality{ display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:2px 0 0; }
|
| 567 |
.qitem{ display:flex; align-items:baseline; gap:8px; }
|
| 568 |
+
.qitem__label{ font-size:12px; color:var(--ink-600); }
|
| 569 |
+
.qitem__value{ font-size:14px; font-weight:800; color:var(--ink-900); }
|
| 570 |
+
.qitem__value.strong{ color:var(--pos-fg); }
|
| 571 |
+
.qitem__value.dd-pos{ color:var(--pos-fg); } /* small drawdown */
|
| 572 |
+
.qitem__value.dd-mid{ color:var(--ink-900); } /* medium drawdown */
|
| 573 |
+
.qitem__value.dd-neg{ color:var(--neg-fg); } /* large drawdown */
|
| 574 |
+
|
| 575 |
+
/* ======= Stats (WinRate, Trades, Days) ======= */
|
| 576 |
+
.stats{ display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; font-size:12px; color:var(--ink-700); }
|
| 577 |
+
.stat{ display:flex; align-items:center; justify-content:space-between; background:#F8FAFD; border:1px solid var(--bd-soft); border-radius:10px; padding:6px 8px; }
|
| 578 |
+
.stat__label{ color:var(--ink-600); }
|
| 579 |
+
.stat__val{ font-weight:800; color:var(--ink-900); }
|
| 580 |
+
.stat__val.pos{ color:var(--pos-fg); }
|
| 581 |
+
.stat__val.neg{ color:var(--neg-fg); }
|
| 582 |
+
|
| 583 |
+
/* ======= Bar vs B&H ======= */
|
| 584 |
+
.bar{ height:6px; border-radius:999px; background:#F2F4F8; overflow:hidden; border:1px solid var(--bd-soft); margin:2px 0 8px; }
|
| 585 |
+
.bar span{ display:block; height:100%; width:var(--bar, 40%); transition:width .5s ease;
|
| 586 |
+
background: linear-gradient(90deg,#16a34a,#22c55e);
|
| 587 |
}
|
| 588 |
+
.bar.neg span{ background: linear-gradient(90deg,#ef4444,#dc2626); }
|
| 589 |
+
|
| 590 |
+
/* ======= Meta (Gap vs B&H chip + EOD) ======= */
|
| 591 |
+
.meta{ display:grid; grid-template-columns:1fr auto; align-items:center; gap:8px; }
|
| 592 |
+
.chip{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 593 |
display:inline-flex; align-items:center; gap:6px;
|
| 594 |
font-size:12px; font-weight:800; padding:4px 8px; border-radius:999px;
|
| 595 |
+
background:#F6F8FB; color:var(--ink-900); border:1px solid var(--bd-soft);
|
| 596 |
}
|
| 597 |
+
.chip.pos{ color:var(--pos-fg); background:var(--pos-bg); border-color:var(--pos-br); }
|
| 598 |
+
.chip.neg{ color:var(--neg-fg); background:var(--neg-bg); border-color:var(--neg-br); }
|
| 599 |
.chip__label{ opacity:.8; }
|
| 600 |
.chip__value{ font-variant-numeric: tabular-nums; }
|
| 601 |
+
.eod{ font-size:12px; color:var(--ink-600); }
|
| 602 |
+
|
| 603 |
+
/* ======= Responsive ======= */
|
| 604 |
+
@media (max-width: 900px){
|
| 605 |
+
.stats{ grid-template-columns:1fr 1fr; }
|
| 606 |
+
}
|
| 607 |
+
@media (max-width: 640px){
|
| 608 |
+
.cards-grid-f1{ grid-template-columns:1fr; }
|
| 609 |
+
.kpi__value{ font-size:22px; }
|
| 610 |
+
}
|
| 611 |
</style>
|