diff --git a/crypto_monitor_binance/templates/index.html b/crypto_monitor_binance/templates/index.html
index 65fd313..0c9a505 100644
--- a/crypto_monitor_binance/templates/index.html
+++ b/crypto_monitor_binance/templates/index.html
@@ -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}
-
+
@@ -822,7 +822,8 @@
-
+
+
@@ -907,6 +908,7 @@ function setDetailBodyPlain(text){
body.innerText = text || "";
}
function setDetailBodyMarkdown(text){
+ if(window.InstanceUI && InstanceUI.clearDetailActions) InstanceUI.clearDetailActions();
const body = document.getElementById("detailBody");
if(!body) return;
if(window.AiReviewRender && AiReviewRender.setElementMarkdown){
@@ -1110,22 +1112,12 @@ function loadJournals(){
const qs = listWindowQueryString();
fetch("/api/journals" + (qs ? "?" + qs : "")).then(r=>r.json()).then(data=>{
Object.keys(journalCache).forEach(k=>delete journalCache[k]);
- let html="";
- data.forEach(o=>{
- journalCache[o.id] = o;
- const moodTags = (o.mood_issues || []).join(",") || "无";
- html += `
-
${o.coin||"-"} ${o.tf||"-"} | 盈亏:${o.pnl||"-"}U
-
开:${o.open_datetime||"-"} 平:${o.close_datetime||"-"} 持仓:${o.hold_duration||"-"}
-
心态标签:${moodTags}
-
-
-
-
-
`;
- });
+ data.forEach(o=>{ journalCache[o.id] = o; });
const box = document.getElementById("journal-list");
- if(box){ box.innerHTML = html || "
-
${o.coin||"-"} ${o.tf||"-"} | 盈亏:${o.pnl||"-"}U
-
开:${o.open_datetime||"-"} 平:${o.close_datetime||"-"} 持仓:${o.hold_duration||"-"}
-
心态标签:${moodTags}
-
-
-
-
-
`;
- });
+ data.forEach(o=>{ journalCache[o.id] = o; });
const box = document.getElementById("journal-list");
- if(box){ box.innerHTML = html || "
-
${o.coin||"-"} ${o.tf||"-"} | 盈亏:${o.pnl||"-"}U
-
开:${o.open_datetime||"-"} 平:${o.close_datetime||"-"} 持仓:${o.hold_duration||"-"}
-
心态标签:${moodTags}
-
-
-
-
-
`;
- });
+ data.forEach(o=>{ journalCache[o.id] = o; });
const box = document.getElementById("journal-list");
- if(box){ box.innerHTML = html || "
-
${o.coin||"-"} ${o.tf||"-"} | 盈亏:${o.pnl||"-"}U
-
开:${o.open_datetime||"-"} 平:${o.close_datetime||"-"} 持仓:${o.hold_duration||"-"}
-
心态标签:${moodTags}
-
-
-
-
-
`;
- });
+ data.forEach(o=>{ journalCache[o.id] = o; });
const box = document.getElementById("journal-list");
- if(box){ box.innerHTML = html || "
+
${escapeHtml(o.coin || "-")} ${escapeHtml(o.tf || "-")} | 盈亏:${escapeHtml(o.pnl == null || o.pnl === "" ? "-" : o.pnl)}U
+
开:${escapeHtml(o.open_datetime || "-")} 平:${escapeHtml(o.close_datetime || "-")} 持仓:${escapeHtml(o.hold_duration || "-")}
+
心态标签:${escapeHtml(moodTags)}
+
+
+
+
+
`;
+ })
+ .join("");
+ }
+
+ function parseTradeRecordRow(tr) {
+ const cells = tr.querySelectorAll("td");
+ if (cells.length < 14) return null;
+ const dirBadge = cells[2].querySelector(".badge");
+ return {
+ rowId: tr.id,
+ symbol: cells[0].textContent.trim(),
+ type: cells[1].textContent.trim(),
+ directionHtml: dirBadge ? dirBadge.outerHTML : cells[2].innerHTML,
+ directionText: cells[2].textContent.trim(),
+ trigger: cells[3].textContent.trim(),
+ stopLoss: cells[4].textContent.trim(),
+ takeProfit: cells[5].textContent.trim(),
+ margin: cells[6].textContent.trim(),
+ leverage: cells[7].textContent.trim(),
+ holdMinutes: cells[8].textContent.trim(),
+ openedAt: cells[9].textContent.trim(),
+ closedAt: cells[10].textContent.trim(),
+ pnlHtml: cells[11].innerHTML,
+ pnlText: cells[11].textContent.trim(),
+ resultHtml: cells[12].innerHTML,
+ resultText: cells[12].textContent.trim(),
+ actionsHtml: cells[13].innerHTML,
+ };
+ }
+
+ function renderMobileTradeRow(tr) {
+ const row = parseTradeRecordRow(tr);
+ if (!row) return "";
+ const pnlCls = pnlClassFromValue(row.pnlText);
+ return `