Fix options review light theme dark card/filter styles.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5412,6 +5412,113 @@ html[data-theme="light"] .settings-account-summary {
|
||||
box-shadow: 0 1px 3px rgba(20, 34, 50, 0.06);
|
||||
}
|
||||
|
||||
/* 期权复盘 · 亮色主题(覆盖面板内暗色默认变量) */
|
||||
html[data-theme="light"] .options-review-wrap {
|
||||
--or-section-bg: #fff;
|
||||
--or-section-shadow: 0 1px 3px rgba(20, 34, 50, 0.06);
|
||||
--or-border: #9eb0c4;
|
||||
--or-border-soft: #c8d4e0;
|
||||
--or-border-faint: #dce4ec;
|
||||
--or-text: #142232;
|
||||
--or-title: #142232;
|
||||
--or-muted: #3a5068;
|
||||
--or-filters-bg: #eef3f8;
|
||||
--or-tile-bg: #f6f9fc;
|
||||
--or-badge-bg: rgba(0, 110, 154, 0.1);
|
||||
--or-accent-bg: rgba(0, 110, 154, 0.12);
|
||||
--or-accent-fg: #004d6e;
|
||||
--or-accent-border: rgba(0, 95, 140, 0.28);
|
||||
--or-row-active-bg: rgba(0, 110, 154, 0.08);
|
||||
--or-row-hover-bg: rgba(0, 110, 154, 0.06);
|
||||
--or-modal-bg: #fff;
|
||||
--or-modal-shadow: 0 12px 40px rgba(20, 34, 50, 0.18);
|
||||
--or-backdrop: rgba(20, 34, 50, 0.45);
|
||||
--or-img-bg: #eef3f8;
|
||||
color: #142232;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-section {
|
||||
background: #fff !important;
|
||||
border-color: #9eb0c4 !important;
|
||||
box-shadow: 0 1px 3px rgba(20, 34, 50, 0.06);
|
||||
color: #142232 !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-section-title,
|
||||
html[data-theme="light"] .options-review-wrap .or-detail-modal-head h3,
|
||||
html[data-theme="light"] .options-review-wrap .or-page-head h2 {
|
||||
color: #142232 !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-section-desc,
|
||||
html[data-theme="light"] .options-review-wrap .muted,
|
||||
html[data-theme="light"] .options-review-wrap .sub {
|
||||
color: #3a5068 !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-filters {
|
||||
background: #eef3f8 !important;
|
||||
border-color: #c8d4e0 !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-kpi-tile,
|
||||
html[data-theme="light"] .options-review-wrap .or-stat-card,
|
||||
html[data-theme="light"] .options-review-wrap .or-detail-img-cell {
|
||||
background: #f6f9fc !important;
|
||||
border-color: #c8d4e0 !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-tab {
|
||||
background: #fff !important;
|
||||
color: #006e9a !important;
|
||||
border-color: rgba(0, 95, 140, 0.22) !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-tab.active {
|
||||
background: rgba(0, 110, 154, 0.12) !important;
|
||||
color: #004d6e !important;
|
||||
border-color: rgba(0, 95, 140, 0.28) !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-step {
|
||||
background: rgba(0, 110, 154, 0.12) !important;
|
||||
color: #004d6e !important;
|
||||
border-color: rgba(0, 95, 140, 0.28) !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-badge {
|
||||
background: rgba(0, 110, 154, 0.1) !important;
|
||||
color: #004d6e !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-detail-modal {
|
||||
background: #fff !important;
|
||||
color: #142232 !important;
|
||||
border-color: #9eb0c4 !important;
|
||||
box-shadow: 0 12px 40px rgba(20, 34, 50, 0.18);
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-detail-backdrop {
|
||||
background: rgba(20, 34, 50, 0.45) !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .options-strike-table thead th {
|
||||
background: #eef3f8 !important;
|
||||
color: #334155 !important;
|
||||
border-bottom: 1px solid #c8d4e0 !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .options-strike-table th,
|
||||
html[data-theme="light"] .options-review-wrap .options-strike-table td {
|
||||
color: #142232 !important;
|
||||
border-bottom-color: #d0dae4 !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .options-review-wrap .or-trades-table tr.or-row-active,
|
||||
html[data-theme="light"] .options-review-wrap .or-reviewed-table tbody tr:hover {
|
||||
background: rgba(0, 110, 154, 0.08) !important;
|
||||
}
|
||||
|
||||
.pos-pnl-profit {
|
||||
color: #7ee787;
|
||||
}
|
||||
|
||||
@@ -115,17 +115,17 @@
|
||||
);
|
||||
}
|
||||
|
||||
function pnlStyle(v) {
|
||||
function pnlClass(v) {
|
||||
var n = Number(v);
|
||||
if (n > 0) return "color:#3dd68c";
|
||||
if (n < 0) return "color:#f07178";
|
||||
if (n > 0) return "pos-pnl-profit";
|
||||
if (n < 0) return "pos-pnl-loss";
|
||||
return "";
|
||||
}
|
||||
|
||||
function resultStyle(tag) {
|
||||
function resultClass(tag) {
|
||||
var t = String(tag || "").trim();
|
||||
if (t === "盈利") return "color:#3dd68c;font-weight:600";
|
||||
if (t === "亏损") return "color:#f07178;font-weight:600";
|
||||
if (t === "盈利") return "pos-pnl-profit";
|
||||
if (t === "亏损") return "pos-pnl-loss";
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -395,8 +395,8 @@
|
||||
"<td>" +
|
||||
escapeHtml(tradeTitle(t)) +
|
||||
"</td>" +
|
||||
'<td style="' +
|
||||
pnlStyle(t.realized_pnl_total) +
|
||||
'<td class="' +
|
||||
pnlClass(t.realized_pnl_total) +
|
||||
'">' +
|
||||
fmtPnl(t.realized_pnl_total) +
|
||||
"</td>" +
|
||||
@@ -496,8 +496,8 @@
|
||||
"<td>" +
|
||||
escapeHtml(direction || "—") +
|
||||
"</td>" +
|
||||
'<td style="' +
|
||||
pnlStyle(t.realized_pnl_total) +
|
||||
'<td class="' +
|
||||
pnlClass(t.realized_pnl_total) +
|
||||
'">' +
|
||||
fmtPnl(t.realized_pnl_total) +
|
||||
"</td>" +
|
||||
@@ -516,8 +516,8 @@
|
||||
"<td>" +
|
||||
escapeHtml(entryLogic || "—") +
|
||||
"</td>" +
|
||||
'<td style="' +
|
||||
resultStyle(t.result_tag) +
|
||||
'<td class="' +
|
||||
resultClass(t.result_tag) +
|
||||
'">' +
|
||||
escapeHtml(t.result_tag || "—") +
|
||||
"</td>" +
|
||||
@@ -713,10 +713,20 @@
|
||||
}
|
||||
meta.innerHTML = cells
|
||||
.map(function (pair) {
|
||||
var cls = "";
|
||||
if (pair[0] === "盈亏" || pair[0] === "永续盈亏" || pair[0] === "期权盈亏") {
|
||||
cls = pnlClass(t.realized_pnl_total);
|
||||
if (pair[0] === "永续盈亏") cls = pnlClass(t.realized_pnl_perp);
|
||||
if (pair[0] === "期权盈亏") cls = pnlClass(t.realized_pnl_options);
|
||||
} else if (pair[0] === "结果") {
|
||||
cls = resultClass(e.result_tag);
|
||||
}
|
||||
return (
|
||||
"<div><div class=\"muted\" style=\"font-size:11px\">" +
|
||||
escapeHtml(pair[0]) +
|
||||
"</div><div>" +
|
||||
'</div><div class="' +
|
||||
cls +
|
||||
'">' +
|
||||
escapeHtml(pair[1]) +
|
||||
"</div></div>"
|
||||
);
|
||||
@@ -739,7 +749,9 @@
|
||||
escapeHtml(legRoleLabel(leg.leg_role)) +
|
||||
"</td><td>" +
|
||||
escapeHtml(leg.inst_id || leg.symbol || "") +
|
||||
"</td><td>" +
|
||||
"</td><td class=\"" +
|
||||
pnlClass(leg.realized_pnl) +
|
||||
"\">" +
|
||||
fmtPnl(leg.realized_pnl) +
|
||||
"</td><td>" +
|
||||
escapeHtml(closeReasonLabel(leg.close_reason)) +
|
||||
@@ -811,14 +823,14 @@
|
||||
["平均持有", fmtHold(k.avg_hold_sec)],
|
||||
]
|
||||
.map(function (pair) {
|
||||
var style = "";
|
||||
if (pair[0] === "累计盈亏") style = pnlStyle(k.pnl_sum);
|
||||
if (pair[0] === "平均盈亏") style = pnlStyle(k.avg_pnl);
|
||||
var cls = "";
|
||||
if (pair[0] === "累计盈亏") cls = pnlClass(k.pnl_sum);
|
||||
if (pair[0] === "平均盈亏") cls = pnlClass(k.avg_pnl);
|
||||
return (
|
||||
'<div class="or-kpi-tile"><div class="or-kpi-label">' +
|
||||
pair[0] +
|
||||
'</div><div class="or-kpi-value" style="' +
|
||||
style +
|
||||
'</div><div class="or-kpi-value' +
|
||||
(cls ? " " + cls : "") +
|
||||
'">' +
|
||||
pair[1] +
|
||||
"</div></div>"
|
||||
|
||||
Reference in New Issue
Block a user