Align trade record detail fields with label-value grid layout.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -237,7 +237,7 @@
|
||||
.stats-period-block h3{font-size:1rem;color:#dbe4ff;margin-bottom:4px}
|
||||
.stats-period-block .sub{font-size:.78rem;color:#8892b0;margin-bottom:10px;line-height:1.4}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=17">
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=18">
|
||||
|
||||
</head>
|
||||
<body data-page="{{ page }}">
|
||||
@@ -822,7 +822,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/instance_ui.js?v=2"></script>
|
||||
<script src="/static/instance_ui.js?v=3"></script>
|
||||
<script src="/static/instance_records_mobile.js?v=2"></script>
|
||||
<script src="/static/time_close_ui.js?v=2"></script>
|
||||
<script src="/static/ai_review_render.js?v=2"></script>
|
||||
@@ -911,6 +911,7 @@ function setDetailBodyMarkdown(text){
|
||||
if(window.InstanceUI && InstanceUI.clearDetailActions) InstanceUI.clearDetailActions();
|
||||
const body = document.getElementById("detailBody");
|
||||
if(!body) return;
|
||||
body.classList.remove("trade-record-detail-wrap", "journal-detail-meta");
|
||||
if(window.AiReviewRender && AiReviewRender.setElementMarkdown){
|
||||
body.classList.add("md-review");
|
||||
AiReviewRender.setElementMarkdown(body, text || "");
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
.stats-period-block h3{font-size:1rem;color:#dbe4ff;margin-bottom:4px}
|
||||
.stats-period-block .sub{font-size:.78rem;color:#8892b0;margin-bottom:10px;line-height:1.4}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=17">
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=18">
|
||||
|
||||
</head>
|
||||
<body data-page="{{ page }}">
|
||||
@@ -789,7 +789,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/instance_ui.js?v=2"></script>
|
||||
<script src="/static/instance_ui.js?v=3"></script>
|
||||
<script src="/static/instance_records_mobile.js?v=2"></script>
|
||||
<script src="/static/time_close_ui.js?v=2"></script>
|
||||
<script src="/static/ai_review_render.js?v=2"></script>
|
||||
@@ -878,6 +878,7 @@ function setDetailBodyMarkdown(text){
|
||||
if(window.InstanceUI && InstanceUI.clearDetailActions) InstanceUI.clearDetailActions();
|
||||
const body = document.getElementById("detailBody");
|
||||
if(!body) return;
|
||||
body.classList.remove("trade-record-detail-wrap", "journal-detail-meta");
|
||||
if(window.AiReviewRender && AiReviewRender.setElementMarkdown){
|
||||
body.classList.add("md-review");
|
||||
AiReviewRender.setElementMarkdown(body, text || "");
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
.stats-period-block h3{font-size:1rem;color:#dbe4ff;margin-bottom:4px}
|
||||
.stats-period-block .sub{font-size:.78rem;color:#8892b0;margin-bottom:10px;line-height:1.4}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=17">
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=18">
|
||||
|
||||
</head>
|
||||
<body data-page="{{ page }}">
|
||||
@@ -789,7 +789,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/instance_ui.js?v=2"></script>
|
||||
<script src="/static/instance_ui.js?v=3"></script>
|
||||
<script src="/static/instance_records_mobile.js?v=2"></script>
|
||||
<script src="/static/time_close_ui.js?v=2"></script>
|
||||
<script src="/static/ai_review_render.js?v=2"></script>
|
||||
@@ -878,6 +878,7 @@ function setDetailBodyMarkdown(text){
|
||||
if(window.InstanceUI && InstanceUI.clearDetailActions) InstanceUI.clearDetailActions();
|
||||
const body = document.getElementById("detailBody");
|
||||
if(!body) return;
|
||||
body.classList.remove("trade-record-detail-wrap", "journal-detail-meta");
|
||||
if(window.AiReviewRender && AiReviewRender.setElementMarkdown){
|
||||
body.classList.add("md-review");
|
||||
AiReviewRender.setElementMarkdown(body, text || "");
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
.stats-period-block h3{font-size:1rem;color:#dbe4ff;margin-bottom:4px}
|
||||
.stats-period-block .sub{font-size:.78rem;color:#8892b0;margin-bottom:10px;line-height:1.4}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=17">
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=18">
|
||||
|
||||
</head>
|
||||
<body data-page="{{ page }}">
|
||||
@@ -818,7 +818,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/instance_ui.js?v=2"></script>
|
||||
<script src="/static/instance_ui.js?v=3"></script>
|
||||
<script src="/static/instance_records_mobile.js?v=2"></script>
|
||||
<script src="/static/time_close_ui.js?v=2"></script>
|
||||
<script src="/static/ai_review_render.js?v=2"></script>
|
||||
@@ -907,6 +907,7 @@ function setDetailBodyMarkdown(text){
|
||||
if(window.InstanceUI && InstanceUI.clearDetailActions) InstanceUI.clearDetailActions();
|
||||
const body = document.getElementById("detailBody");
|
||||
if(!body) return;
|
||||
body.classList.remove("trade-record-detail-wrap", "journal-detail-meta");
|
||||
if(window.AiReviewRender && AiReviewRender.setElementMarkdown){
|
||||
body.classList.add("md-review");
|
||||
AiReviewRender.setElementMarkdown(body, text || "");
|
||||
|
||||
@@ -208,6 +208,14 @@
|
||||
font-size: 0.78rem !important;
|
||||
padding: 6px 10px !important;
|
||||
}
|
||||
|
||||
.detail-modal .panel-body.trade-record-detail-wrap {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.trd-row {
|
||||
grid-template-columns: 76px minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 721px) {
|
||||
@@ -216,6 +224,41 @@
|
||||
}
|
||||
}
|
||||
|
||||
.detail-modal .panel-body.trade-record-detail-wrap {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.trade-record-detail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.trd-row {
|
||||
display: grid;
|
||||
grid-template-columns: 92px minmax(0, 1fr);
|
||||
gap: 8px 12px;
|
||||
align-items: center;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.trd-label {
|
||||
color: #8892b0;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.trd-value {
|
||||
color: #e5e9ff;
|
||||
font-size: 0.86rem;
|
||||
text-align: left;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.trd-value .badge {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* 手机竖屏(含大屏手机) */
|
||||
@media (max-width: 900px) and (orientation: portrait) {
|
||||
.grid {
|
||||
@@ -1206,6 +1249,14 @@ html[data-theme="light"] .key-row-collapse.key-history-failed .key-history-outco
|
||||
border-color: rgba(192, 48, 48, 0.22) !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .trd-label {
|
||||
color: #6a7588 !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .trd-value {
|
||||
color: #142232 !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .mobile-record-row {
|
||||
background: #fff !important;
|
||||
border-color: #b8c8d8 !important;
|
||||
|
||||
+24
-20
@@ -53,7 +53,7 @@
|
||||
function setJournalDetailBody(o, formatExitLine) {
|
||||
const body = document.getElementById("detailBody");
|
||||
if (!body) return;
|
||||
body.classList.remove("md-review");
|
||||
body.classList.remove("md-review", "trade-record-detail-wrap");
|
||||
body.classList.add("journal-detail-meta");
|
||||
body.innerHTML = buildJournalDetailHtml(o, formatExitLine);
|
||||
}
|
||||
@@ -144,7 +144,7 @@
|
||||
rowId: tr.id,
|
||||
symbol: cells[0].textContent.trim(),
|
||||
type: cells[1].textContent.trim(),
|
||||
directionHtml: dirBadge ? dirBadge.outerHTML : cells[2].innerHTML,
|
||||
directionHtml: (dirBadge ? dirBadge.outerHTML : cells[2].innerHTML).trim(),
|
||||
directionText: cells[2].textContent.trim(),
|
||||
trigger: cells[3].textContent.trim(),
|
||||
stopLoss: cells[4].textContent.trim(),
|
||||
@@ -154,9 +154,9 @@
|
||||
holdMinutes: cells[8].textContent.trim(),
|
||||
openedAt: cells[9].textContent.trim(),
|
||||
closedAt: cells[10].textContent.trim(),
|
||||
pnlHtml: cells[11].innerHTML,
|
||||
pnlHtml: cells[11].innerHTML.trim(),
|
||||
pnlText: cells[11].textContent.trim(),
|
||||
resultHtml: cells[12].innerHTML,
|
||||
resultHtml: cells[12].innerHTML.trim(),
|
||||
resultText: cells[12].textContent.trim(),
|
||||
actionsHtml: cells[13].innerHTML,
|
||||
};
|
||||
@@ -173,23 +173,26 @@
|
||||
</button>`;
|
||||
}
|
||||
|
||||
function tradeDetailRow(label, valueHtml) {
|
||||
return `<div class="trd-row"><span class="trd-label">${escapeHtml(label)}</span><span class="trd-value">${valueHtml}</span></div>`;
|
||||
}
|
||||
|
||||
function buildTradeRecordDetailHtml(row) {
|
||||
const lines = [
|
||||
`品种:${escapeHtml(row.symbol)}`,
|
||||
`类型:${escapeHtml(row.type)}`,
|
||||
`方向:${row.directionHtml}`,
|
||||
`成交价:${escapeHtml(row.trigger)}`,
|
||||
`止损(开仓):${escapeHtml(row.stopLoss)}`,
|
||||
`止盈:${escapeHtml(row.takeProfit)}`,
|
||||
`基数:${escapeHtml(row.margin)}`,
|
||||
`杠杆:${escapeHtml(row.leverage)}`,
|
||||
`持仓分钟:${escapeHtml(row.holdMinutes)}`,
|
||||
`开仓时间:${escapeHtml(row.openedAt)}`,
|
||||
`平仓时间:${escapeHtml(row.closedAt)}`,
|
||||
`盈亏U:${row.pnlHtml}`,
|
||||
`结果:${row.resultHtml}`,
|
||||
];
|
||||
return lines.join("<br>");
|
||||
return `<div class="trade-record-detail">${
|
||||
tradeDetailRow("品种", escapeHtml(row.symbol)) +
|
||||
tradeDetailRow("类型", escapeHtml(row.type)) +
|
||||
tradeDetailRow("方向", row.directionHtml) +
|
||||
tradeDetailRow("成交价", escapeHtml(row.trigger)) +
|
||||
tradeDetailRow("止损(开仓)", escapeHtml(row.stopLoss)) +
|
||||
tradeDetailRow("止盈", escapeHtml(row.takeProfit)) +
|
||||
tradeDetailRow("基数", escapeHtml(row.margin)) +
|
||||
tradeDetailRow("杠杆", escapeHtml(row.leverage)) +
|
||||
tradeDetailRow("持仓分钟", escapeHtml(row.holdMinutes)) +
|
||||
tradeDetailRow("开仓时间", escapeHtml(row.openedAt)) +
|
||||
tradeDetailRow("平仓时间", escapeHtml(row.closedAt)) +
|
||||
tradeDetailRow("盈亏U", row.pnlHtml) +
|
||||
tradeDetailRow("结果", row.resultHtml)
|
||||
}</div>`;
|
||||
}
|
||||
|
||||
function clearDetailActions() {
|
||||
@@ -229,6 +232,7 @@
|
||||
const body = document.getElementById("detailBody");
|
||||
if (body) {
|
||||
body.classList.remove("md-review", "journal-detail-meta");
|
||||
body.classList.add("trade-record-detail-wrap");
|
||||
body.innerHTML = buildTradeRecordDetailHtml(row);
|
||||
}
|
||||
setDetailActionsHtml(
|
||||
|
||||
Reference in New Issue
Block a user