feat: implement analysis service, dashboard components, and data collection utilities for PolyWeather
This commit is contained in:
@@ -2049,11 +2049,16 @@
|
||||
z-index: 880;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14px;
|
||||
padding: 14px;
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.14);
|
||||
border-radius: 24px;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 82% -10%,
|
||||
rgba(59, 130, 246, 0.14),
|
||||
transparent 34%
|
||||
),
|
||||
radial-gradient(
|
||||
circle at 8% 50%,
|
||||
rgba(34, 211, 238, 0.12),
|
||||
@@ -2066,170 +2071,527 @@
|
||||
both;
|
||||
}
|
||||
|
||||
.root :global(.home-summary-grid) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.root :global(.home-summary-card) {
|
||||
min-height: 106px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 14px 16px;
|
||||
border-radius: 16px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.14);
|
||||
background: rgba(8, 15, 28, 0.7);
|
||||
}
|
||||
|
||||
.root :global(.home-summary-card-head) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.root :global(.home-summary-card-head strong) {
|
||||
color: #f8fafc;
|
||||
font-size: 14px;
|
||||
font-weight: 760;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.root :global(.home-summary-card-body) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
align-items: end;
|
||||
}
|
||||
|
||||
.root :global(.home-summary-stat) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.root :global(.home-summary-stat b) {
|
||||
color: #f8fafc;
|
||||
font-size: 28px;
|
||||
font-weight: 850;
|
||||
line-height: 1;
|
||||
letter-spacing: -0.04em;
|
||||
}
|
||||
|
||||
.root :global(.home-summary-stat span) {
|
||||
color: rgba(148, 163, 184, 0.82);
|
||||
font-size: 10px;
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
.root :global(.home-summary-stat b.accent-red) {
|
||||
color: #fb7185;
|
||||
}
|
||||
.root :global(.home-summary-stat b.accent-amber) {
|
||||
color: #fbbf24;
|
||||
}
|
||||
.root :global(.home-summary-stat b.accent-green) {
|
||||
color: #4ade80;
|
||||
}
|
||||
.root :global(.home-summary-stat b.accent-cyan) {
|
||||
color: #22d3ee;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-heading) {
|
||||
.root :global(.opportunity-strip-topline) {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 4px 4px 0;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-heading > div) {
|
||||
.root :global(.opportunity-strip-copy) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
gap: 7px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-heading > div:first-child) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-heading span) {
|
||||
color: rgba(148, 163, 184, 0.82);
|
||||
.root :global(.opportunity-strip-kicker) {
|
||||
color: rgba(148, 163, 184, 0.8);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-heading strong) {
|
||||
.root :global(.opportunity-strip-copy strong) {
|
||||
color: #f8fafc;
|
||||
font-size: 17px;
|
||||
font-weight: 820;
|
||||
font-size: 19px;
|
||||
font-weight: 860;
|
||||
line-height: 1.25;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-status) {
|
||||
.root :global(.opportunity-strip-copy p) {
|
||||
max-width: 620px;
|
||||
color: rgba(191, 219, 254, 0.74);
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-tape) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
gap: 10px;
|
||||
justify-content: flex-end;
|
||||
max-width: 360px;
|
||||
max-width: 460px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-status-chip) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
.root :global(.opportunity-tape-pill) {
|
||||
display: flex;
|
||||
min-width: 92px;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.16);
|
||||
background: rgba(9, 16, 30, 0.7);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-tape-pill span) {
|
||||
color: rgba(148, 163, 184, 0.82);
|
||||
font-size: 10px;
|
||||
font-weight: 760;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-tape-pill strong) {
|
||||
color: #f8fafc;
|
||||
font-size: 16px;
|
||||
font-weight: 860;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-tape-pill.accent-cyan strong) {
|
||||
color: #67e8f9;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-tape-pill.accent-green strong) {
|
||||
color: #4ade80;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-tape-pill.accent-slate strong) {
|
||||
color: rgba(226, 232, 240, 0.78);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-tape-pill.accent-outline) {
|
||||
min-width: auto;
|
||||
justify-content: center;
|
||||
min-height: 28px;
|
||||
padding: 0 10px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.18);
|
||||
background: rgba(8, 15, 28, 0.78);
|
||||
color: rgba(226, 232, 240, 0.88);
|
||||
padding: 9px 11px;
|
||||
background: rgba(6, 11, 23, 0.62);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-tape-pill.accent-outline span) {
|
||||
color: rgba(191, 219, 254, 0.92);
|
||||
font-size: 11px;
|
||||
font-weight: 780;
|
||||
letter-spacing: 0;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-main) {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.92fr);
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-card) {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
min-height: 244px;
|
||||
padding: 18px;
|
||||
border: 1px solid rgba(56, 189, 248, 0.18);
|
||||
border-radius: 22px;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 100% 0%,
|
||||
rgba(14, 165, 233, 0.22),
|
||||
transparent 28%
|
||||
),
|
||||
radial-gradient(
|
||||
circle at 12% 88%,
|
||||
rgba(16, 185, 129, 0.1),
|
||||
transparent 28%
|
||||
),
|
||||
linear-gradient(135deg, rgba(7, 14, 28, 0.96), rgba(12, 27, 48, 0.92));
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
box-shadow:
|
||||
0 18px 42px rgba(2, 6, 23, 0.28),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
||||
transition:
|
||||
transform 160ms ease,
|
||||
border-color 160ms ease,
|
||||
box-shadow 160ms ease;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-card:hover) {
|
||||
transform: translateY(-2px);
|
||||
border-color: rgba(34, 211, 238, 0.36);
|
||||
box-shadow:
|
||||
0 24px 52px rgba(2, 6, 23, 0.36),
|
||||
0 0 0 1px rgba(34, 211, 238, 0.08);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-header) {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-copy) {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-kicker) {
|
||||
color: #67e8f9;
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-title-row) {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-title-row strong) {
|
||||
overflow: hidden;
|
||||
color: #f8fafc;
|
||||
font-size: 28px;
|
||||
font-weight: 880;
|
||||
line-height: 1;
|
||||
letter-spacing: -0.04em;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-status-chip.live) {
|
||||
border-color: rgba(74, 222, 128, 0.24);
|
||||
.root :global(.opportunity-hero-date) {
|
||||
color: rgba(186, 230, 253, 0.76);
|
||||
font-size: 12px;
|
||||
font-weight: 720;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-copy p) {
|
||||
max-width: 520px;
|
||||
color: rgba(226, 232, 240, 0.82);
|
||||
font-size: 13px;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-tags) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-tag) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 30px;
|
||||
padding: 0 11px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.16);
|
||||
background: rgba(7, 13, 25, 0.58);
|
||||
color: rgba(226, 232, 240, 0.92);
|
||||
font-size: 11px;
|
||||
font-weight: 820;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-tag.engine) {
|
||||
border-color: rgba(34, 211, 238, 0.24);
|
||||
color: #67e8f9;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-tag.signal-yes) {
|
||||
border-color: rgba(74, 222, 128, 0.26);
|
||||
color: #86efac;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-status-chip.pending) {
|
||||
.root :global(.opportunity-hero-tag.signal-no) {
|
||||
border-color: rgba(251, 113, 133, 0.24);
|
||||
color: #fda4af;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-tag.signal-neutral) {
|
||||
color: rgba(191, 219, 254, 0.88);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-tag.risk.high) {
|
||||
border-color: rgba(251, 113, 133, 0.24);
|
||||
color: #fda4af;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-tag.risk.medium) {
|
||||
border-color: rgba(251, 191, 36, 0.24);
|
||||
color: #fcd34d;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-status-chip.tradable) {
|
||||
border-color: rgba(34, 211, 238, 0.26);
|
||||
color: #67e8f9;
|
||||
.root :global(.opportunity-hero-tag.risk.low) {
|
||||
border-color: rgba(74, 222, 128, 0.24);
|
||||
color: #86efac;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-status-chip.side) {
|
||||
color: rgba(191, 219, 254, 0.9);
|
||||
.root :global(.opportunity-hero-body) {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-status-chip.muted) {
|
||||
color: rgba(148, 163, 184, 0.88);
|
||||
.root :global(.opportunity-hero-edgeblock) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding: 14px 16px;
|
||||
border-radius: 18px;
|
||||
border: 1px solid rgba(34, 211, 238, 0.18);
|
||||
background:
|
||||
linear-gradient(
|
||||
135deg,
|
||||
rgba(8, 15, 28, 0.84),
|
||||
rgba(13, 30, 52, 0.82)
|
||||
);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-card-grid) {
|
||||
.root :global(.opportunity-hero-edgeblock span) {
|
||||
color: rgba(148, 163, 184, 0.8);
|
||||
font-size: 11px;
|
||||
font-weight: 760;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-edgeblock strong) {
|
||||
color: #4ade80;
|
||||
font-size: 44px;
|
||||
font-weight: 900;
|
||||
line-height: 0.95;
|
||||
letter-spacing: -0.05em;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-edgeblock em) {
|
||||
color: rgba(191, 219, 254, 0.84);
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-metrics) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-card-grid.top-opportunities) {
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
.root :global(.opportunity-hero-metric) {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
padding: 12px 13px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.14);
|
||||
background: rgba(9, 16, 30, 0.6);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-metric span) {
|
||||
color: rgba(148, 163, 184, 0.8);
|
||||
font-size: 10px;
|
||||
font-weight: 760;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-metric strong) {
|
||||
overflow: hidden;
|
||||
color: #f8fafc;
|
||||
font-size: 20px;
|
||||
font-weight: 860;
|
||||
line-height: 1;
|
||||
letter-spacing: -0.03em;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-book) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(110px, 132px)) minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-book-side) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 16px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.16);
|
||||
background: rgba(6, 11, 23, 0.62);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-book-side span) {
|
||||
font-size: 11px;
|
||||
font-weight: 760;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-book-side strong) {
|
||||
font-size: 26px;
|
||||
font-weight: 880;
|
||||
line-height: 1;
|
||||
letter-spacing: -0.03em;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-book-side.yes) {
|
||||
border-color: rgba(34, 211, 238, 0.22);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-book-side.yes span),
|
||||
.root :global(.opportunity-book-side.yes strong) {
|
||||
color: #22d3ee;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-book-side.no) {
|
||||
border-color: rgba(251, 113, 133, 0.22);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-book-side.no span),
|
||||
.root :global(.opportunity-book-side.no strong) {
|
||||
color: #fda4af;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-sparkline-wrap) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 16px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.14);
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 100% 0%,
|
||||
rgba(59, 130, 246, 0.14),
|
||||
transparent 32%
|
||||
),
|
||||
rgba(8, 15, 28, 0.66);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-sparkline-wrap span) {
|
||||
color: rgba(148, 163, 184, 0.8);
|
||||
font-size: 10px;
|
||||
font-weight: 760;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-sparkline) {
|
||||
width: 100%;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-sparkline polyline) {
|
||||
fill: none;
|
||||
stroke: #18e6d4;
|
||||
stroke-width: 2.4;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.26));
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-footer) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
color: rgba(191, 219, 254, 0.82);
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-grid) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-tile) {
|
||||
display: flex;
|
||||
min-height: 116px;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 14px;
|
||||
border-radius: 18px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.14);
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 100% 0%,
|
||||
rgba(30, 64, 175, 0.12),
|
||||
transparent 30%
|
||||
),
|
||||
rgba(9, 16, 30, 0.68);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-tile-head span) {
|
||||
color: rgba(241, 245, 249, 0.92);
|
||||
font-size: 13px;
|
||||
font-weight: 790;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-tile-body) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-stat) {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-stat b) {
|
||||
overflow: hidden;
|
||||
color: #f8fafc;
|
||||
font-size: 24px;
|
||||
font-weight: 880;
|
||||
line-height: 1;
|
||||
letter-spacing: -0.04em;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-stat span) {
|
||||
color: rgba(148, 163, 184, 0.82);
|
||||
font-size: 10px;
|
||||
font-weight: 680;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-stat b.accent-red) {
|
||||
color: #fb7185;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-stat b.accent-amber) {
|
||||
color: #fbbf24;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-stat b.accent-green) {
|
||||
color: #4ade80;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-side-stat b.accent-cyan) {
|
||||
color: #22d3ee;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-mini-grid) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-empty-state) {
|
||||
display: flex;
|
||||
min-height: 132px;
|
||||
min-height: 168px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 18px;
|
||||
@@ -2263,16 +2625,17 @@
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-card) {
|
||||
.root :global(.opportunity-mini-card) {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 9px;
|
||||
min-height: 132px;
|
||||
gap: 12px;
|
||||
min-height: 152px;
|
||||
padding: 14px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.14);
|
||||
border-radius: 16px;
|
||||
border-radius: 18px;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 100% 0%,
|
||||
@@ -2290,7 +2653,7 @@
|
||||
background 160ms ease;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-card:hover) {
|
||||
.root :global(.opportunity-mini-card:hover) {
|
||||
transform: translateY(-2px);
|
||||
border-color: rgba(34, 211, 238, 0.32);
|
||||
background:
|
||||
@@ -2302,32 +2665,34 @@
|
||||
rgba(15, 23, 42, 0.92);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-card-header),
|
||||
.root :global(.opportunity-card-footer) {
|
||||
.root :global(.opportunity-mini-head) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-price-pair) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-rank) {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.24);
|
||||
.root :global(.opportunity-mini-rank) {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(148, 163, 184, 0.2);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #f8fafc;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
font-size: 13px;
|
||||
font-weight: 840;
|
||||
flex-shrink: 0;
|
||||
background: rgba(6, 11, 23, 0.46);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-mini-copy) {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-pill) {
|
||||
@@ -2355,22 +2720,31 @@
|
||||
border-color: rgba(74, 222, 128, 0.24);
|
||||
}
|
||||
|
||||
.root :global(.opportunity-city) {
|
||||
.root :global(.opportunity-mini-copy strong) {
|
||||
overflow: hidden;
|
||||
color: #f8fafc;
|
||||
font-size: 13px;
|
||||
font-weight: 850;
|
||||
font-size: 15px;
|
||||
font-weight: 860;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-meta) {
|
||||
.root :global(.opportunity-mini-copy p) {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
color: rgba(203, 213, 225, 0.88);
|
||||
font-size: 11px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
min-height: 16px;
|
||||
line-height: 1.45;
|
||||
min-height: 32px;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-mini-metrics) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-yes) {
|
||||
@@ -2391,13 +2765,13 @@
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-sparkline) {
|
||||
.root :global(.opportunity-mini-sparkline) {
|
||||
width: 100%;
|
||||
height: 28px;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-sparkline polyline) {
|
||||
.root :global(.opportunity-mini-sparkline polyline) {
|
||||
fill: none;
|
||||
stroke: #18e6d4;
|
||||
stroke-width: 2;
|
||||
@@ -2452,10 +2826,13 @@
|
||||
:global(html.light) .root :global(.home-weather-stat strong),
|
||||
:global(html.light) .root :global(.home-deb-card strong),
|
||||
:global(html.light) .root :global(.home-card-section h3),
|
||||
:global(html.light) .root :global(.home-summary-card-head strong),
|
||||
:global(html.light) .root :global(.opportunity-strip-heading strong),
|
||||
:global(html.light) .root :global(.opportunity-city),
|
||||
:global(html.light) .root :global(.home-summary-stat b),
|
||||
:global(html.light) .root :global(.opportunity-strip-copy strong),
|
||||
:global(html.light) .root :global(.opportunity-hero-title-row strong),
|
||||
:global(html.light) .root :global(.opportunity-hero-metric strong),
|
||||
:global(html.light) .root :global(.opportunity-hero-edgeblock strong),
|
||||
:global(html.light) .root :global(.opportunity-book-side strong),
|
||||
:global(html.light) .root :global(.opportunity-side-stat b),
|
||||
:global(html.light) .root :global(.opportunity-mini-copy strong),
|
||||
:global(html.light) .root :global(.city-item .city-name-text) {
|
||||
color: #0b1726;
|
||||
}
|
||||
@@ -2467,9 +2844,19 @@
|
||||
:global(html.light) .root :global(.home-weather-stat small),
|
||||
:global(html.light) .root :global(.home-deb-card small),
|
||||
:global(html.light) .root :global(.home-card-section h3 small),
|
||||
:global(html.light) .root :global(.home-summary-stat span),
|
||||
:global(html.light) .root :global(.opportunity-strip-heading span),
|
||||
:global(html.light) .root :global(.opportunity-meta),
|
||||
:global(html.light) .root :global(.opportunity-strip-kicker),
|
||||
:global(html.light) .root :global(.opportunity-strip-copy p),
|
||||
:global(html.light) .root :global(.opportunity-tape-pill span),
|
||||
:global(html.light) .root :global(.opportunity-hero-kicker),
|
||||
:global(html.light) .root :global(.opportunity-hero-date),
|
||||
:global(html.light) .root :global(.opportunity-hero-copy p),
|
||||
:global(html.light) .root :global(.opportunity-hero-metric span),
|
||||
:global(html.light) .root :global(.opportunity-hero-edgeblock span),
|
||||
:global(html.light) .root :global(.opportunity-hero-edgeblock em),
|
||||
:global(html.light) .root :global(.opportunity-hero-footer),
|
||||
:global(html.light) .root :global(.opportunity-side-tile-head span),
|
||||
:global(html.light) .root :global(.opportunity-side-stat span),
|
||||
:global(html.light) .root :global(.opportunity-mini-copy p),
|
||||
:global(html.light) .root :global(.city-group-title),
|
||||
:global(html.light) .root :global(.home-panel-kicker),
|
||||
:global(html.light) .root :global(.home-panel-airport) {
|
||||
@@ -2514,7 +2901,13 @@
|
||||
}
|
||||
|
||||
:global(html.light) .root :global(.home-summary-card),
|
||||
:global(html.light) .root :global(.opportunity-card),
|
||||
:global(html.light) .root :global(.opportunity-hero-card),
|
||||
:global(html.light) .root :global(.opportunity-side-tile),
|
||||
:global(html.light) .root :global(.opportunity-mini-card),
|
||||
:global(html.light) .root :global(.opportunity-tape-pill),
|
||||
:global(html.light) .root :global(.opportunity-hero-metric),
|
||||
:global(html.light) .root :global(.opportunity-book-side),
|
||||
:global(html.light) .root :global(.opportunity-hero-sparkline-wrap),
|
||||
:global(html.light) .root :global(.home-deb-card),
|
||||
:global(html.light) .root :global(.home-card-section),
|
||||
:global(html.light) .root :global(.home-metric-card),
|
||||
@@ -2630,6 +3023,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1240px) {
|
||||
.root :global(.opportunity-strip-topline) {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-tape) {
|
||||
max-width: none;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-metrics) {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-book) {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.root :global(.opportunity-hero-sparkline-wrap) {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-mini-grid) {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1020px) {
|
||||
.root :global(.map) {
|
||||
left: 18px;
|
||||
@@ -2638,10 +3058,13 @@
|
||||
|
||||
.root :global(.home-opportunity-strip) {
|
||||
left: 18px;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-strip-main) {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.root :global(.opportunity-card-grid) {
|
||||
.root :global(.opportunity-side-grid) {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@@ -4252,7 +4675,6 @@
|
||||
0 8px 32px rgba(0, 0, 0, 0.4),
|
||||
inset 0 1px 1px rgba(255, 255, 255, 0.05);
|
||||
pointer-events: none;
|
||||
animation: nearby-fade-in 0.4s ease-out;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@@ -4300,19 +4722,8 @@
|
||||
border: 1.5px solid var(--accent-cyan);
|
||||
border-radius: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
animation: sonar-pulse 2s infinite cubic-bezier(0, 0.2, 0.8, 1);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@keyframes sonar-pulse {
|
||||
0% {
|
||||
transform: translate(-50%, -50%) scale(0.5);
|
||||
opacity: 0.8;
|
||||
}
|
||||
100% {
|
||||
transform: translate(-50%, -50%) scale(2.5);
|
||||
opacity: 0;
|
||||
}
|
||||
opacity: 0.3;
|
||||
box-shadow: 0 0 10px rgba(34, 211, 238, 0.18);
|
||||
}
|
||||
|
||||
.root :global(.nearby-content) {
|
||||
|
||||
@@ -1618,6 +1618,7 @@ function OpportunityStrip({
|
||||
const store = useDashboardStore();
|
||||
const stripState = useMemo(() => {
|
||||
const targetSet = new Set(scanTargetNames);
|
||||
const totalCount = scanTargetNames.length || snapshots.length;
|
||||
const targetedSnapshots = (scanTargetNames.length
|
||||
? snapshots.filter((snapshot) => targetSet.has(snapshot.city.name))
|
||||
: snapshots
|
||||
@@ -1665,6 +1666,9 @@ function OpportunityStrip({
|
||||
}, 0) / tradableSnapshots.length
|
||||
: null;
|
||||
const bestTradableSnapshot = tradableSnapshots[0] || null;
|
||||
const bestTradableEdge = bestTradableSnapshot
|
||||
? normalizeEdgePercent(getMarketEdgeValue(bestTradableSnapshot.detail))
|
||||
: null;
|
||||
const bestTradableCityName = bestTradableSnapshot
|
||||
? getLocalizedCityDisplay(
|
||||
bestTradableSnapshot.city,
|
||||
@@ -1682,16 +1686,23 @@ function OpportunityStrip({
|
||||
const lowCount = snapshots.filter(
|
||||
(snapshot) => snapshot.city.deb_recent_tier === "low",
|
||||
).length;
|
||||
const noEdgeCount = Math.max(completedCount - tradableSnapshots.length, 0);
|
||||
|
||||
return {
|
||||
items: tradableSnapshots.slice(0, 5),
|
||||
totalCount,
|
||||
completedCount,
|
||||
pendingCount,
|
||||
errorCount,
|
||||
liveCount: liveSnapshots.length,
|
||||
tradableCount: tradableSnapshots.length,
|
||||
noEdgeCount,
|
||||
yesCount,
|
||||
noCount,
|
||||
avgTradableEdge,
|
||||
bestTradableSnapshot,
|
||||
bestTradableEdge,
|
||||
bestTradableCityName,
|
||||
summaryCards: [
|
||||
{
|
||||
key: "scan-progress",
|
||||
@@ -1699,7 +1710,7 @@ function OpportunityStrip({
|
||||
items: [
|
||||
{
|
||||
label: locale === "en-US" ? "Completed" : "已完成",
|
||||
value: `${completedCount}/${scanTargetNames.length || snapshots.length}`,
|
||||
value: `${completedCount}/${totalCount}`,
|
||||
accent: "cyan" as const,
|
||||
},
|
||||
{
|
||||
@@ -1730,7 +1741,7 @@ function OpportunityStrip({
|
||||
},
|
||||
{
|
||||
label: locale === "en-US" ? "No edge" : "无机会",
|
||||
value: String(Math.max(completedCount - tradableSnapshots.length, 0)),
|
||||
value: String(noEdgeCount),
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -1779,6 +1790,8 @@ function OpportunityStrip({
|
||||
],
|
||||
},
|
||||
],
|
||||
overviewKicker:
|
||||
locale === "en-US" ? "EMOS Market Scanner" : "EMOS 交易扫描台",
|
||||
headingTitle:
|
||||
tradableSnapshots.length > 0
|
||||
? locale === "en-US"
|
||||
@@ -1786,11 +1799,49 @@ function OpportunityStrip({
|
||||
: `发现 ${tradableSnapshots.length} 个可交易市场 · 当前最佳 ${bestTradableCityName}`
|
||||
: pendingCount > 0
|
||||
? locale === "en-US"
|
||||
? `Scanning ${completedCount}/${scanTargetNames.length || snapshots.length} cities`
|
||||
: `正在扫描 ${completedCount}/${scanTargetNames.length || snapshots.length} 个城市市场层`
|
||||
? `Scanning ${completedCount}/${totalCount} cities`
|
||||
: `正在扫描 ${completedCount}/${totalCount} 个城市市场层`
|
||||
: locale === "en-US"
|
||||
? `Completed ${completedCount} scans · no tradable market`
|
||||
: `已完成 ${completedCount} 个城市扫描 · 当前无可交易市场`,
|
||||
overviewBody:
|
||||
tradableSnapshots.length > 0
|
||||
? locale === "en-US"
|
||||
? "Use EMOS distribution against the live CLOB quote and surface the highest executable edge first."
|
||||
: "用 EMOS 概率分布对齐实时 CLOB 盘口,优先展示当前可执行 edge 最高的市场。"
|
||||
: pendingCount > 0
|
||||
? locale === "en-US"
|
||||
? "The opportunity layer is filling active markets and will promote the first executable setup when quotes arrive."
|
||||
: "机会层正在补齐活跃盘口,等最新报价返回后会直接抬出第一优先机会。"
|
||||
: locale === "en-US"
|
||||
? "Scanner is live, but the current market prices do not beat the EMOS distribution yet."
|
||||
: "扫描器在线,但当前盘口价格还没有跑赢 EMOS 概率分布。",
|
||||
tapeStats: [
|
||||
{
|
||||
key: "coverage",
|
||||
label: locale === "en-US" ? "Coverage" : "覆盖城市",
|
||||
value: `${completedCount}/${totalCount}`,
|
||||
accent: "cyan" as const,
|
||||
},
|
||||
{
|
||||
key: "live",
|
||||
label: locale === "en-US" ? "Live" : "在线盘口",
|
||||
value: String(liveSnapshots.length),
|
||||
accent: "green" as const,
|
||||
},
|
||||
{
|
||||
key: "tradable",
|
||||
label: locale === "en-US" ? "Tradable" : "可交易",
|
||||
value: String(tradableSnapshots.length),
|
||||
accent: "cyan" as const,
|
||||
},
|
||||
{
|
||||
key: "avg-edge",
|
||||
label: locale === "en-US" ? "Avg edge" : "平均优势",
|
||||
value: formatEdge(avgTradableEdge),
|
||||
accent: avgTradableEdge != null ? ("green" as const) : ("slate" as const),
|
||||
},
|
||||
],
|
||||
yesCountLabel:
|
||||
locale === "en-US" ? `YES bias ${yesCount}` : `YES 倾向 ${yesCount}`,
|
||||
noCountLabel:
|
||||
@@ -1800,84 +1851,293 @@ function OpportunityStrip({
|
||||
|
||||
if (!snapshots.length) return null;
|
||||
|
||||
const heroSnapshot = stripState.bestTradableSnapshot;
|
||||
const heroSide = getBestSide(heroSnapshot?.detail);
|
||||
const heroSignalLabel =
|
||||
heroSnapshot?.detail?.market_scan?.signal_label ||
|
||||
(heroSide === "yes"
|
||||
? locale === "en-US"
|
||||
? "BUY YES"
|
||||
: "买入 YES"
|
||||
: heroSide === "no"
|
||||
? locale === "en-US"
|
||||
? "BUY NO"
|
||||
: "买入 NO"
|
||||
: locale === "en-US"
|
||||
? "MONITOR"
|
||||
: "继续监控");
|
||||
const heroSignalTone = heroSignalLabel.toLowerCase().includes("yes")
|
||||
? "yes"
|
||||
: heroSignalLabel.toLowerCase().includes("no")
|
||||
? "no"
|
||||
: "neutral";
|
||||
const heroSymbol = heroSnapshot
|
||||
? getTempSymbol(heroSnapshot.city, heroSnapshot.summary, heroSnapshot.detail)
|
||||
: "°C";
|
||||
const heroTier =
|
||||
heroSnapshot?.city.deb_recent_tier ||
|
||||
heroSnapshot?.city.risk_level ||
|
||||
heroSnapshot?.summary?.risk?.level ||
|
||||
heroSnapshot?.detail?.risk?.level;
|
||||
const heroCityName = heroSnapshot
|
||||
? getLocalizedCityDisplay(
|
||||
heroSnapshot.city,
|
||||
locale,
|
||||
heroSnapshot.summary,
|
||||
heroSnapshot.detail,
|
||||
)
|
||||
: "--";
|
||||
const heroMarketBucket = heroSnapshot?.detail?.market_scan?.temperature_bucket;
|
||||
const heroQuestion =
|
||||
heroSnapshot?.detail?.market_scan?.primary_market?.question ||
|
||||
`${getProbabilityLabel(heroMarketBucket || {}, heroSymbol)} ${
|
||||
heroSnapshot?.detail?.market_scan?.selected_date ||
|
||||
heroSnapshot?.detail?.local_date ||
|
||||
""
|
||||
}`;
|
||||
const heroEngine = (() => {
|
||||
const engine = String(
|
||||
heroSnapshot?.detail?.market_scan?.probability_engine || "EMOS",
|
||||
).toLowerCase();
|
||||
if (engine.includes("emos")) return "EMOS";
|
||||
return engine.toUpperCase();
|
||||
})();
|
||||
const heroModelProbability =
|
||||
heroSnapshot?.detail?.market_scan?.model_probability ??
|
||||
heroMarketBucket?.probability ??
|
||||
null;
|
||||
const heroMidpoint =
|
||||
heroSnapshot?.detail?.market_scan?.midpoint ??
|
||||
heroSnapshot?.detail?.market_scan?.market_price ??
|
||||
null;
|
||||
const heroSpread = heroSnapshot?.detail?.market_scan?.spread ?? null;
|
||||
const heroConfidence =
|
||||
heroSnapshot?.detail?.market_scan?.confidence || null;
|
||||
const heroQuoteSource = heroSnapshot?.detail?.market_scan?.quote_source
|
||||
? String(heroSnapshot.detail.market_scan.quote_source)
|
||||
.replaceAll("_", " ")
|
||||
.toUpperCase()
|
||||
: "CLOB REST";
|
||||
const heroDateLabel =
|
||||
heroSnapshot?.detail?.market_scan?.selected_date ||
|
||||
heroSnapshot?.detail?.local_date ||
|
||||
"--";
|
||||
const heroSparkline = buildSparklinePoints(
|
||||
heroSnapshot?.detail?.market_scan?.sparkline?.length
|
||||
? heroSnapshot.detail.market_scan.sparkline
|
||||
: [
|
||||
Number(
|
||||
heroSnapshot?.summary?.current?.temp ??
|
||||
heroSnapshot?.detail?.current?.temp ??
|
||||
0,
|
||||
),
|
||||
Number(
|
||||
heroSnapshot?.summary?.deb?.prediction ??
|
||||
heroSnapshot?.detail?.deb?.prediction ??
|
||||
0,
|
||||
),
|
||||
Number(
|
||||
heroSnapshot?.detail?.forecast?.today_high ??
|
||||
heroSnapshot?.summary?.deb?.prediction ??
|
||||
0,
|
||||
),
|
||||
],
|
||||
);
|
||||
const secondaryItems = heroSnapshot
|
||||
? stripState.items.filter((snapshot) => snapshot.city.name !== heroSnapshot.city.name)
|
||||
: [];
|
||||
|
||||
return (
|
||||
<section
|
||||
className="home-opportunity-strip"
|
||||
aria-label={locale === "en-US" ? "Opportunity strip" : "机会条"}
|
||||
>
|
||||
<div className="home-summary-grid">
|
||||
{stripState.summaryCards.map((card) => (
|
||||
<div key={card.key} className="home-summary-card">
|
||||
<div className="home-summary-card-head">
|
||||
<strong>{card.title}</strong>
|
||||
<div className="opportunity-strip-topline">
|
||||
<div className="opportunity-strip-copy">
|
||||
<span className="opportunity-strip-kicker">
|
||||
{stripState.overviewKicker}
|
||||
</span>
|
||||
<strong>{stripState.headingTitle}</strong>
|
||||
<p>{stripState.overviewBody}</p>
|
||||
</div>
|
||||
<div className="opportunity-strip-tape" aria-live="polite">
|
||||
{stripState.tapeStats.map((item) => (
|
||||
<div
|
||||
key={item.key}
|
||||
className={clsx(
|
||||
"opportunity-tape-pill",
|
||||
item.accent ? `accent-${item.accent}` : undefined,
|
||||
)}
|
||||
>
|
||||
<span>{item.label}</span>
|
||||
<strong>{item.value}</strong>
|
||||
</div>
|
||||
<div className="home-summary-card-body">
|
||||
{card.items.map((item) => (
|
||||
<div
|
||||
key={`${card.key}-${item.label}`}
|
||||
className="home-summary-stat"
|
||||
>
|
||||
<b
|
||||
className={
|
||||
item.accent ? `accent-${item.accent}` : undefined
|
||||
}
|
||||
))}
|
||||
<div className="opportunity-tape-pill accent-outline">
|
||||
<span>{stripState.yesCountLabel}</span>
|
||||
</div>
|
||||
<div className="opportunity-tape-pill accent-outline">
|
||||
<span>{stripState.noCountLabel}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{heroSnapshot ? (
|
||||
<>
|
||||
<div className="opportunity-strip-main">
|
||||
<button
|
||||
type="button"
|
||||
className="opportunity-hero-card"
|
||||
onClick={() => void store.focusCity(heroSnapshot.city.name)}
|
||||
>
|
||||
<div className="opportunity-hero-header">
|
||||
<div className="opportunity-hero-copy">
|
||||
<span className="opportunity-hero-kicker">
|
||||
{locale === "en-US" ? "Primary market" : "当前主机会"}
|
||||
</span>
|
||||
<div className="opportunity-hero-title-row">
|
||||
<strong>{heroCityName}</strong>
|
||||
<span className="opportunity-hero-date">{heroDateLabel}</span>
|
||||
</div>
|
||||
<p>{heroQuestion}</p>
|
||||
</div>
|
||||
<div className="opportunity-hero-tags">
|
||||
<span className="opportunity-hero-tag engine">{heroEngine}</span>
|
||||
<span
|
||||
className={clsx(
|
||||
"opportunity-hero-tag",
|
||||
`signal-${heroSignalTone}`,
|
||||
)}
|
||||
>
|
||||
{item.value}
|
||||
</b>
|
||||
<span>{item.label}</span>
|
||||
{heroSignalLabel}
|
||||
</span>
|
||||
<span
|
||||
className={clsx(
|
||||
"opportunity-hero-tag",
|
||||
"risk",
|
||||
String(heroTier || "other"),
|
||||
)}
|
||||
>
|
||||
{getRiskCopy(heroTier as RiskLevel | undefined, locale)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="opportunity-hero-body">
|
||||
<div className="opportunity-hero-edgeblock">
|
||||
<span>
|
||||
{locale === "en-US" ? "Executable edge" : "可执行优势"}
|
||||
</span>
|
||||
<strong>{formatEdge(stripState.bestTradableEdge)}</strong>
|
||||
<em>
|
||||
{heroSide === "yes"
|
||||
? locale === "en-US"
|
||||
? "Prefer lifting the YES ask"
|
||||
: "优先吃 YES 买价"
|
||||
: heroSide === "no"
|
||||
? locale === "en-US"
|
||||
? "Prefer lifting the NO ask"
|
||||
: "优先吃 NO 买价"
|
||||
: locale === "en-US"
|
||||
? "Keep monitoring executable quotes"
|
||||
: "继续观察可执行报价"}
|
||||
</em>
|
||||
</div>
|
||||
|
||||
<div className="opportunity-hero-metrics">
|
||||
<div className="opportunity-hero-metric">
|
||||
<span>{locale === "en-US" ? "EMOS prob." : "EMOS 概率"}</span>
|
||||
<strong>{formatProbability(heroModelProbability)}</strong>
|
||||
</div>
|
||||
<div className="opportunity-hero-metric">
|
||||
<span>{locale === "en-US" ? "Midpoint" : "盘口中位"}</span>
|
||||
<strong>{formatCents(heroMidpoint)}</strong>
|
||||
</div>
|
||||
<div className="opportunity-hero-metric">
|
||||
<span>{locale === "en-US" ? "Spread" : "盘口点差"}</span>
|
||||
<strong>{formatCents(heroSpread)}</strong>
|
||||
</div>
|
||||
<div className="opportunity-hero-metric">
|
||||
<span>{locale === "en-US" ? "Confidence" : "信号强度"}</span>
|
||||
<strong>
|
||||
{heroConfidence
|
||||
? String(heroConfidence).toUpperCase()
|
||||
: locale === "en-US"
|
||||
? "LIVE"
|
||||
: "在线"}
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="opportunity-hero-book">
|
||||
<div className="opportunity-book-side yes">
|
||||
<span>YES</span>
|
||||
<strong>{formatCents(heroSnapshot.detail?.market_scan?.yes_buy)}</strong>
|
||||
</div>
|
||||
<div className="opportunity-book-side no">
|
||||
<span>NO</span>
|
||||
<strong>{formatCents(heroSnapshot.detail?.market_scan?.no_buy)}</strong>
|
||||
</div>
|
||||
<div className="opportunity-hero-sparkline-wrap">
|
||||
<span>
|
||||
{locale === "en-US" ? "Market path" : "盘口走势"}
|
||||
</span>
|
||||
<svg
|
||||
className="opportunity-hero-sparkline"
|
||||
viewBox="0 0 132 44"
|
||||
aria-hidden="true"
|
||||
>
|
||||
{heroSparkline ? <polyline points={heroSparkline} /> : null}
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="opportunity-hero-footer">
|
||||
<span>
|
||||
{heroQuoteSource} ·{" "}
|
||||
{locale === "en-US"
|
||||
? "click for city detail"
|
||||
: "点击查看城市详情"}
|
||||
</span>
|
||||
<span>
|
||||
{locale === "en-US"
|
||||
? `Avg edge ${formatEdge(stripState.avgTradableEdge)}`
|
||||
: `平均优势 ${formatEdge(stripState.avgTradableEdge)}`}
|
||||
</span>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div className="opportunity-side-grid">
|
||||
{stripState.summaryCards.map((card) => (
|
||||
<div key={card.key} className="opportunity-side-tile">
|
||||
<div className="opportunity-side-tile-head">
|
||||
<span>{card.title}</span>
|
||||
</div>
|
||||
<div className="opportunity-side-tile-body">
|
||||
{card.items.map((item) => (
|
||||
<div
|
||||
key={`${card.key}-${item.label}`}
|
||||
className="opportunity-side-stat"
|
||||
>
|
||||
<b
|
||||
className={
|
||||
item.accent ? `accent-${item.accent}` : undefined
|
||||
}
|
||||
>
|
||||
{item.value}
|
||||
</b>
|
||||
<span>{item.label}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="opportunity-strip-heading">
|
||||
<div>
|
||||
<span>
|
||||
{locale === "en-US"
|
||||
? "Live Market Scan"
|
||||
: "实时市场扫描"}
|
||||
</span>
|
||||
<strong>{stripState.headingTitle}</strong>
|
||||
</div>
|
||||
<div className="opportunity-strip-status" aria-live="polite">
|
||||
<span className={clsx("opportunity-status-chip", "live")}>
|
||||
{locale === "en-US"
|
||||
? `Live ${stripState.liveCount}`
|
||||
: `在线 ${stripState.liveCount}`}
|
||||
</span>
|
||||
<span
|
||||
className={clsx(
|
||||
"opportunity-status-chip",
|
||||
stripState.pendingCount > 0 ? "pending" : "muted",
|
||||
)}
|
||||
>
|
||||
{locale === "en-US"
|
||||
? `Pending ${stripState.pendingCount}`
|
||||
: `待补齐 ${stripState.pendingCount}`}
|
||||
</span>
|
||||
<span
|
||||
className={clsx(
|
||||
"opportunity-status-chip",
|
||||
stripState.tradableCount > 0 ? "tradable" : "muted",
|
||||
)}
|
||||
>
|
||||
{locale === "en-US"
|
||||
? `Tradable ${stripState.tradableCount}`
|
||||
: `可交易 ${stripState.tradableCount}`}
|
||||
</span>
|
||||
<span className={clsx("opportunity-status-chip", "side")}>
|
||||
{stripState.yesCountLabel}
|
||||
</span>
|
||||
<span className={clsx("opportunity-status-chip", "side")}>
|
||||
{stripState.noCountLabel}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{stripState.items.length > 0 ? (
|
||||
<div className="opportunity-card-grid top-opportunities">
|
||||
{stripState.items.map(({ city, detail, summary }, index) => {
|
||||
{secondaryItems.length > 0 ? (
|
||||
<div className="opportunity-mini-grid">
|
||||
{secondaryItems.map(({ city, detail, summary }, index) => {
|
||||
const symbol = getTempSymbol(city, summary, detail);
|
||||
const debPrediction =
|
||||
summary?.deb?.prediction ?? detail?.deb?.prediction;
|
||||
@@ -1917,14 +2177,17 @@ function OpportunityStrip({
|
||||
<button
|
||||
key={city.name}
|
||||
type="button"
|
||||
className="opportunity-card"
|
||||
className="opportunity-mini-card"
|
||||
onClick={() => void store.focusCity(city.name)}
|
||||
>
|
||||
<div className="opportunity-card-header">
|
||||
<span className="opportunity-rank">{index + 1}</span>
|
||||
<span className="opportunity-city">
|
||||
{localizedCityName}
|
||||
</span>
|
||||
<div className="opportunity-mini-head">
|
||||
<div className="opportunity-mini-rank">
|
||||
<span>{index + 2}</span>
|
||||
</div>
|
||||
<div className="opportunity-mini-copy">
|
||||
<strong>{localizedCityName}</strong>
|
||||
<p>{marketQuestion}</p>
|
||||
</div>
|
||||
<span
|
||||
className={clsx(
|
||||
"opportunity-pill",
|
||||
@@ -1934,23 +2197,24 @@ function OpportunityStrip({
|
||||
{getRiskCopy(tier as RiskLevel | undefined, locale)}
|
||||
</span>
|
||||
</div>
|
||||
<span className="opportunity-meta">
|
||||
{marketQuestion}
|
||||
</span>
|
||||
<div className="opportunity-card-footer">
|
||||
<div className="opportunity-price-pair">
|
||||
<span className="opportunity-yes">
|
||||
YES {formatCents(detail?.market_scan?.yes_buy)}
|
||||
</span>
|
||||
<span className="opportunity-no">
|
||||
NO {formatCents(detail?.market_scan?.no_buy)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div className="opportunity-mini-metrics">
|
||||
<span className="opportunity-yes">
|
||||
YES {formatCents(detail?.market_scan?.yes_buy)}
|
||||
</span>
|
||||
<span className="opportunity-no">
|
||||
NO {formatCents(detail?.market_scan?.no_buy)}
|
||||
</span>
|
||||
<span className="opportunity-edge">
|
||||
{formatEdge(getMarketEdgeValue(detail))}
|
||||
</span>
|
||||
</div>
|
||||
<svg className="opportunity-sparkline" viewBox="0 0 92 28" aria-hidden="true">
|
||||
|
||||
<svg
|
||||
className="opportunity-mini-sparkline"
|
||||
viewBox="0 0 96 28"
|
||||
aria-hidden="true"
|
||||
>
|
||||
{opportunitySparkline ? (
|
||||
<polyline points={opportunitySparkline} />
|
||||
) : null}
|
||||
@@ -1958,7 +2222,9 @@ function OpportunityStrip({
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</>
|
||||
) : (
|
||||
<div className="opportunity-empty-state">
|
||||
<div className="opportunity-empty-copy">
|
||||
@@ -1973,8 +2239,8 @@ function OpportunityStrip({
|
||||
</strong>
|
||||
<span>
|
||||
{locale === "en-US"
|
||||
? `Completed ${stripState.completedCount} cities, live ${stripState.liveCount}, tradable ${stripState.tradableCount}.`
|
||||
: `已完成 ${stripState.completedCount} 个城市扫描,在线盘口 ${stripState.liveCount} 个,可交易机会 ${stripState.tradableCount} 个。`}
|
||||
? `Completed ${stripState.completedCount}/${stripState.totalCount} cities, live ${stripState.liveCount}, tradable ${stripState.tradableCount}.`
|
||||
: `已完成 ${stripState.completedCount}/${stripState.totalCount} 个城市扫描,在线盘口 ${stripState.liveCount} 个,可交易机会 ${stripState.tradableCount} 个。`}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user