Add mobile compact trade and journal lists with tap-to-expand detail.
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=15">
|
||||
<link rel="stylesheet" href="/static/instance_theme.css?v=16">
|
||||
|
||||
</head>
|
||||
<body data-page="{{ page }}">
|
||||
@@ -818,7 +818,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/instance_ui.js?v=1"></script>
|
||||
<script src="/static/instance_ui.js?v=2"></script>
|
||||
<script src="/static/instance_records_mobile.js?v=1"></script>
|
||||
<script src="/static/time_close_ui.js?v=2"></script>
|
||||
<script src="/static/ai_review_render.js?v=2"></script>
|
||||
<script src="/static/form_submit_guard.js?v=2"></script>
|
||||
@@ -903,6 +904,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){
|
||||
@@ -1106,22 +1108,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 += `<div class="entry">
|
||||
<div><strong>${o.coin||"-"} ${o.tf||"-"}</strong> | 盈亏:${o.pnl||"-"}U</div>
|
||||
<div>开:${o.open_datetime||"-"} 平:${o.close_datetime||"-"} 持仓:${o.hold_duration||"-"}</div>
|
||||
<div>心态标签:${moodTags}</div>
|
||||
<div style="display:flex;gap:8px;flex-wrap:wrap;margin-top:6px">
|
||||
<button type="button" class="btn-del" style="border:none;cursor:pointer;background:#1f3a5a;color:#8fc8ff" onclick="openJournalDetail('${o.id}')">查看详情</button>
|
||||
<button type="button" class="btn-del" onclick="deleteJournal('${o.id}')">删除</button>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
data.forEach(o=>{ journalCache[o.id] = o; });
|
||||
const box = document.getElementById("journal-list");
|
||||
if(box){ box.innerHTML = html || "<div class='entry'>暂无数据</div>"; }
|
||||
if(box){
|
||||
const html = InstanceUI.renderJournalListHtml(data);
|
||||
box.innerHTML = html || "<div class='journal-empty-msg'>暂无数据</div>";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user