diff --git a/crypto_monitor_binance/templates/index.html b/crypto_monitor_binance/templates/index.html index fd44892..66d2059 100644 --- a/crypto_monitor_binance/templates/index.html +++ b/crypto_monitor_binance/templates/index.html @@ -82,6 +82,14 @@ .detail-modal .panel-close{padding:6px 10px;background:#2f2134;color:#ffb2b2;border:none;border-radius:8px;cursor:pointer} .detail-modal .panel-body{white-space:pre-wrap;line-height:1.5;font-size:.86rem;color:#e5e9ff} .detail-modal .panel-image{margin-top:10px;max-width:min(100%,680px);border-radius:8px;cursor:pointer;border:1px solid #2a3150} + .detail-modal .panel-actions{display:flex;gap:8px;align-items:center;flex-shrink:0} + .detail-modal .panel-fs{padding:6px 10px;background:#1f3a5a;color:#8fc8ff;border:none;border-radius:8px;cursor:pointer;font-size:.82rem} + .detail-modal.fullscreen{padding:10px} + .detail-modal.fullscreen .panel{width:100%;height:100%;max-width:none;max-height:none;display:flex;flex-direction:column;overflow:hidden} + .detail-modal.fullscreen .panel-body{flex:1;overflow:auto;min-height:0;font-size:.9rem} + .ai-result-wrap{margin-top:8px} + .ai-result-toolbar{display:flex;gap:8px;margin-top:6px} + .ai-result-toolbar .btn-fs{padding:4px 10px;font-size:.78rem;background:#1f3a5a;color:#8fc8ff;border:none;border-radius:6px;cursor:pointer} .table-wrap{overflow-x:auto} .dual-panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch} .dual-panel-grid .card{height:100%;display:flex;flex-direction:column} @@ -746,8 +754,18 @@ - - + +
交易复盘记录 @@ -807,7 +825,10 @@
详情
- +
+ + +
@@ -854,8 +875,28 @@ function validateJournalEntryReason(){ } function showImage(src){document.getElementById("bigImg").src=src;document.getElementById("imgModal").style.display="flex";} function closeModal(){document.getElementById("imgModal").style.display="none";} -function forceCloseDetailModal(){document.getElementById("detailModal").style.display="none";} +function setDetailModalFullscreen(on){ + const modal = document.getElementById("detailModal"); + if(modal){ modal.classList.toggle("fullscreen", !!on); } +} +function forceCloseDetailModal(){ + const modal = document.getElementById("detailModal"); + if(modal){ modal.style.display = "none"; modal.classList.remove("fullscreen"); } +} function closeDetailModal(e){if(e.target && e.target.id==="detailModal"){forceCloseDetailModal();}} +function expandDetailToFullscreen(){ setDetailModalFullscreen(true); } +function openAiInlineResultFullscreen(title, elementId){ + const el = document.getElementById(elementId || "daily_result"); + const text = String((el && el.innerText) || "").trim(); + if(!text){ alert("暂无内容"); return; } + document.getElementById("detailTitle").innerText = title || "AI复盘"; + document.getElementById("detailBody").innerText = text; + const imgEl = document.getElementById("detailImage"); + imgEl.src = ""; + imgEl.style.display = "none"; + setDetailModalFullscreen(true); + document.getElementById("detailModal").style.display = "flex"; +} const journalCache = {}; const reviewCache = {}; @@ -897,10 +938,11 @@ function openJournalDetail(id){ imgEl.src = ""; imgEl.style.display = "none"; } + setDetailModalFullscreen(false); document.getElementById("detailModal").style.display = "flex"; } -function openReviewDetail(id){ +function openReviewDetail(id, fullscreen){ const r = reviewCache[id]; if(!r){ return; } document.getElementById("detailTitle").innerText = `${r.review_type === "daily" ? "日复盘" : "周复盘"}|${r.target_date || "-"}`; @@ -908,6 +950,7 @@ function openReviewDetail(id){ const imgEl = document.getElementById("detailImage"); imgEl.src = ""; imgEl.style.display = "none"; + setDetailModalFullscreen(!!fullscreen); document.getElementById("detailModal").style.display = "flex"; } @@ -1096,7 +1139,8 @@ function loadReviews(){
${r.created_at || ""}
${shortText || "(空)"}
- + + 导出MD
@@ -1113,8 +1157,10 @@ function genDaily(){ fetch("/ai_daily_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`date=${encodeURIComponent(d)}`}) .then(r=>r.json()).then(data=>{ const el=document.getElementById("daily_result"); + const wrap=document.getElementById("daily_result_wrap"); el.innerText=data.result; - el.style.display="block"; + if(wrap){ wrap.style.display="block"; } + else { el.style.display="block"; } loadReviews(); }); } @@ -1126,8 +1172,10 @@ function genWeekly(){ fetch("/ai_weekly_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`start_date=${encodeURIComponent(s)}&end_date=${encodeURIComponent(e)}`}) .then(r=>r.json()).then(data=>{ const el=document.getElementById("weekly_result"); + const wrap=document.getElementById("weekly_result_wrap"); el.innerText=data.result; - el.style.display="block"; + if(wrap){ wrap.style.display="block"; } + else { el.style.display="block"; } loadReviews(); }); } diff --git a/crypto_monitor_gate/templates/index.html b/crypto_monitor_gate/templates/index.html index fd44892..66d2059 100644 --- a/crypto_monitor_gate/templates/index.html +++ b/crypto_monitor_gate/templates/index.html @@ -82,6 +82,14 @@ .detail-modal .panel-close{padding:6px 10px;background:#2f2134;color:#ffb2b2;border:none;border-radius:8px;cursor:pointer} .detail-modal .panel-body{white-space:pre-wrap;line-height:1.5;font-size:.86rem;color:#e5e9ff} .detail-modal .panel-image{margin-top:10px;max-width:min(100%,680px);border-radius:8px;cursor:pointer;border:1px solid #2a3150} + .detail-modal .panel-actions{display:flex;gap:8px;align-items:center;flex-shrink:0} + .detail-modal .panel-fs{padding:6px 10px;background:#1f3a5a;color:#8fc8ff;border:none;border-radius:8px;cursor:pointer;font-size:.82rem} + .detail-modal.fullscreen{padding:10px} + .detail-modal.fullscreen .panel{width:100%;height:100%;max-width:none;max-height:none;display:flex;flex-direction:column;overflow:hidden} + .detail-modal.fullscreen .panel-body{flex:1;overflow:auto;min-height:0;font-size:.9rem} + .ai-result-wrap{margin-top:8px} + .ai-result-toolbar{display:flex;gap:8px;margin-top:6px} + .ai-result-toolbar .btn-fs{padding:4px 10px;font-size:.78rem;background:#1f3a5a;color:#8fc8ff;border:none;border-radius:6px;cursor:pointer} .table-wrap{overflow-x:auto} .dual-panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch} .dual-panel-grid .card{height:100%;display:flex;flex-direction:column} @@ -746,8 +754,18 @@
- - + +
交易复盘记录 @@ -807,7 +825,10 @@
详情
- +
+ + +
@@ -854,8 +875,28 @@ function validateJournalEntryReason(){ } function showImage(src){document.getElementById("bigImg").src=src;document.getElementById("imgModal").style.display="flex";} function closeModal(){document.getElementById("imgModal").style.display="none";} -function forceCloseDetailModal(){document.getElementById("detailModal").style.display="none";} +function setDetailModalFullscreen(on){ + const modal = document.getElementById("detailModal"); + if(modal){ modal.classList.toggle("fullscreen", !!on); } +} +function forceCloseDetailModal(){ + const modal = document.getElementById("detailModal"); + if(modal){ modal.style.display = "none"; modal.classList.remove("fullscreen"); } +} function closeDetailModal(e){if(e.target && e.target.id==="detailModal"){forceCloseDetailModal();}} +function expandDetailToFullscreen(){ setDetailModalFullscreen(true); } +function openAiInlineResultFullscreen(title, elementId){ + const el = document.getElementById(elementId || "daily_result"); + const text = String((el && el.innerText) || "").trim(); + if(!text){ alert("暂无内容"); return; } + document.getElementById("detailTitle").innerText = title || "AI复盘"; + document.getElementById("detailBody").innerText = text; + const imgEl = document.getElementById("detailImage"); + imgEl.src = ""; + imgEl.style.display = "none"; + setDetailModalFullscreen(true); + document.getElementById("detailModal").style.display = "flex"; +} const journalCache = {}; const reviewCache = {}; @@ -897,10 +938,11 @@ function openJournalDetail(id){ imgEl.src = ""; imgEl.style.display = "none"; } + setDetailModalFullscreen(false); document.getElementById("detailModal").style.display = "flex"; } -function openReviewDetail(id){ +function openReviewDetail(id, fullscreen){ const r = reviewCache[id]; if(!r){ return; } document.getElementById("detailTitle").innerText = `${r.review_type === "daily" ? "日复盘" : "周复盘"}|${r.target_date || "-"}`; @@ -908,6 +950,7 @@ function openReviewDetail(id){ const imgEl = document.getElementById("detailImage"); imgEl.src = ""; imgEl.style.display = "none"; + setDetailModalFullscreen(!!fullscreen); document.getElementById("detailModal").style.display = "flex"; } @@ -1096,7 +1139,8 @@ function loadReviews(){
${r.created_at || ""}
${shortText || "(空)"}
- + + 导出MD
@@ -1113,8 +1157,10 @@ function genDaily(){ fetch("/ai_daily_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`date=${encodeURIComponent(d)}`}) .then(r=>r.json()).then(data=>{ const el=document.getElementById("daily_result"); + const wrap=document.getElementById("daily_result_wrap"); el.innerText=data.result; - el.style.display="block"; + if(wrap){ wrap.style.display="block"; } + else { el.style.display="block"; } loadReviews(); }); } @@ -1126,8 +1172,10 @@ function genWeekly(){ fetch("/ai_weekly_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`start_date=${encodeURIComponent(s)}&end_date=${encodeURIComponent(e)}`}) .then(r=>r.json()).then(data=>{ const el=document.getElementById("weekly_result"); + const wrap=document.getElementById("weekly_result_wrap"); el.innerText=data.result; - el.style.display="block"; + if(wrap){ wrap.style.display="block"; } + else { el.style.display="block"; } loadReviews(); }); } diff --git a/crypto_monitor_gate_bot/templates/index.html b/crypto_monitor_gate_bot/templates/index.html index f4a407c..cb534e1 100644 --- a/crypto_monitor_gate_bot/templates/index.html +++ b/crypto_monitor_gate_bot/templates/index.html @@ -83,6 +83,14 @@ .detail-modal .panel-close{padding:6px 10px;background:#2f2134;color:#ffb2b2;border:none;border-radius:8px;cursor:pointer} .detail-modal .panel-body{white-space:pre-wrap;line-height:1.5;font-size:.86rem;color:#e5e9ff} .detail-modal .panel-image{margin-top:10px;max-width:min(100%,680px);border-radius:8px;cursor:pointer;border:1px solid #2a3150} + .detail-modal .panel-actions{display:flex;gap:8px;align-items:center;flex-shrink:0} + .detail-modal .panel-fs{padding:6px 10px;background:#1f3a5a;color:#8fc8ff;border:none;border-radius:8px;cursor:pointer;font-size:.82rem} + .detail-modal.fullscreen{padding:10px} + .detail-modal.fullscreen .panel{width:100%;height:100%;max-width:none;max-height:none;display:flex;flex-direction:column;overflow:hidden} + .detail-modal.fullscreen .panel-body{flex:1;overflow:auto;min-height:0;font-size:.9rem} + .ai-result-wrap{margin-top:8px} + .ai-result-toolbar{display:flex;gap:8px;margin-top:6px} + .ai-result-toolbar .btn-fs{padding:4px 10px;font-size:.78rem;background:#1f3a5a;color:#8fc8ff;border:none;border-radius:6px;cursor:pointer} .table-wrap{overflow-x:auto} .trade-dashboard{grid-column:1/-1;display:flex;flex-direction:column;gap:14px} .trade-panels-row,.dual-panel-grid,.strategy-trading-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch} @@ -572,8 +580,18 @@
- - + +
交易复盘记录 @@ -646,7 +664,10 @@
详情
- +
+ + +
@@ -693,7 +714,27 @@ function validateJournalEntryReason(){ } function showImage(src){document.getElementById("bigImg").src=src;document.getElementById("imgModal").style.display="flex";} function closeModal(){document.getElementById("imgModal").style.display="none";} -function forceCloseDetailModal(){document.getElementById("detailModal").style.display="none";} +function setDetailModalFullscreen(on){ + const modal = document.getElementById("detailModal"); + if(modal){ modal.classList.toggle("fullscreen", !!on); } +} +function forceCloseDetailModal(){ + const modal = document.getElementById("detailModal"); + if(modal){ modal.style.display = "none"; modal.classList.remove("fullscreen"); } +} +function expandDetailToFullscreen(){ setDetailModalFullscreen(true); } +function openAiInlineResultFullscreen(title, elementId){ + const el = document.getElementById(elementId || "daily_result"); + const text = String((el && el.innerText) || "").trim(); + if(!text){ alert("暂无内容"); return; } + document.getElementById("detailTitle").innerText = title || "AI复盘"; + document.getElementById("detailBody").innerText = text; + const imgEl = document.getElementById("detailImage"); + imgEl.src = ""; + imgEl.style.display = "none"; + setDetailModalFullscreen(true); + document.getElementById("detailModal").style.display = "flex"; +} function fmtU2(n){ if(n === null || n === undefined || n === "") return "-"; const x = Number(n); @@ -771,10 +812,11 @@ function openJournalDetail(id){ imgEl.src = ""; imgEl.style.display = "none"; } + setDetailModalFullscreen(false); document.getElementById("detailModal").style.display = "flex"; } -function openReviewDetail(id){ +function openReviewDetail(id, fullscreen){ const r = reviewCache[id]; if(!r){ return; } document.getElementById("detailTitle").innerText = `${r.review_type === "daily" ? "日复盘" : "周复盘"}|${r.target_date || "-"}`; @@ -782,6 +824,7 @@ function openReviewDetail(id){ const imgEl = document.getElementById("detailImage"); imgEl.src = ""; imgEl.style.display = "none"; + setDetailModalFullscreen(!!fullscreen); document.getElementById("detailModal").style.display = "flex"; } @@ -929,7 +972,8 @@ function loadReviews(){
${r.created_at || ""}
${shortText || "(空)"}
- + + 导出MD
@@ -946,8 +990,10 @@ function genDaily(){ fetch("/ai_daily_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`date=${encodeURIComponent(d)}`}) .then(r=>r.json()).then(data=>{ const el=document.getElementById("daily_result"); + const wrap=document.getElementById("daily_result_wrap"); el.innerText=data.result; - el.style.display="block"; + if(wrap){ wrap.style.display="block"; } + else { el.style.display="block"; } loadReviews(); }); } @@ -959,8 +1005,10 @@ function genWeekly(){ fetch("/ai_weekly_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`start_date=${encodeURIComponent(s)}&end_date=${encodeURIComponent(e)}`}) .then(r=>r.json()).then(data=>{ const el=document.getElementById("weekly_result"); + const wrap=document.getElementById("weekly_result_wrap"); el.innerText=data.result; - el.style.display="block"; + if(wrap){ wrap.style.display="block"; } + else { el.style.display="block"; } loadReviews(); }); } diff --git a/crypto_monitor_okx/templates/index.html b/crypto_monitor_okx/templates/index.html index 6f05fe3..77f407a 100644 --- a/crypto_monitor_okx/templates/index.html +++ b/crypto_monitor_okx/templates/index.html @@ -82,6 +82,14 @@ .detail-modal .panel-close{padding:6px 10px;background:#2f2134;color:#ffb2b2;border:none;border-radius:8px;cursor:pointer} .detail-modal .panel-body{white-space:pre-wrap;line-height:1.5;font-size:.86rem;color:#e5e9ff} .detail-modal .panel-image{margin-top:10px;max-width:min(100%,680px);border-radius:8px;cursor:pointer;border:1px solid #2a3150} + .detail-modal .panel-actions{display:flex;gap:8px;align-items:center;flex-shrink:0} + .detail-modal .panel-fs{padding:6px 10px;background:#1f3a5a;color:#8fc8ff;border:none;border-radius:8px;cursor:pointer;font-size:.82rem} + .detail-modal.fullscreen{padding:10px} + .detail-modal.fullscreen .panel{width:100%;height:100%;max-width:none;max-height:none;display:flex;flex-direction:column;overflow:hidden} + .detail-modal.fullscreen .panel-body{flex:1;overflow:auto;min-height:0;font-size:.9rem} + .ai-result-wrap{margin-top:8px} + .ai-result-toolbar{display:flex;gap:8px;margin-top:6px} + .ai-result-toolbar .btn-fs{padding:4px 10px;font-size:.78rem;background:#1f3a5a;color:#8fc8ff;border:none;border-radius:6px;cursor:pointer} .table-wrap{overflow-x:auto} .dual-panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch} .dual-panel-grid .card{height:100%;display:flex;flex-direction:column} @@ -755,8 +763,18 @@
- - + +
交易复盘记录 @@ -816,7 +834,10 @@
详情
- +
+ + +
@@ -863,8 +884,28 @@ function validateJournalEntryReason(){ } function showImage(src){document.getElementById("bigImg").src=src;document.getElementById("imgModal").style.display="flex";} function closeModal(){document.getElementById("imgModal").style.display="none";} -function forceCloseDetailModal(){document.getElementById("detailModal").style.display="none";} +function setDetailModalFullscreen(on){ + const modal = document.getElementById("detailModal"); + if(modal){ modal.classList.toggle("fullscreen", !!on); } +} +function forceCloseDetailModal(){ + const modal = document.getElementById("detailModal"); + if(modal){ modal.style.display = "none"; modal.classList.remove("fullscreen"); } +} function closeDetailModal(e){if(e.target && e.target.id==="detailModal"){forceCloseDetailModal();}} +function expandDetailToFullscreen(){ setDetailModalFullscreen(true); } +function openAiInlineResultFullscreen(title, elementId){ + const el = document.getElementById(elementId || "daily_result"); + const text = String((el && el.innerText) || "").trim(); + if(!text){ alert("暂无内容"); return; } + document.getElementById("detailTitle").innerText = title || "AI复盘"; + document.getElementById("detailBody").innerText = text; + const imgEl = document.getElementById("detailImage"); + imgEl.src = ""; + imgEl.style.display = "none"; + setDetailModalFullscreen(true); + document.getElementById("detailModal").style.display = "flex"; +} const journalCache = {}; const reviewCache = {}; @@ -906,10 +947,11 @@ function openJournalDetail(id){ imgEl.src = ""; imgEl.style.display = "none"; } + setDetailModalFullscreen(false); document.getElementById("detailModal").style.display = "flex"; } -function openReviewDetail(id){ +function openReviewDetail(id, fullscreen){ const r = reviewCache[id]; if(!r){ return; } document.getElementById("detailTitle").innerText = `${r.review_type === "daily" ? "日复盘" : "周复盘"}|${r.target_date || "-"}`; @@ -917,6 +959,7 @@ function openReviewDetail(id){ const imgEl = document.getElementById("detailImage"); imgEl.src = ""; imgEl.style.display = "none"; + setDetailModalFullscreen(!!fullscreen); document.getElementById("detailModal").style.display = "flex"; } @@ -1105,7 +1148,8 @@ function loadReviews(){
${r.created_at || ""}
${shortText || "(空)"}
- + + 导出MD
@@ -1122,8 +1166,10 @@ function genDaily(){ fetch("/ai_daily_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`date=${encodeURIComponent(d)}`}) .then(r=>r.json()).then(data=>{ const el=document.getElementById("daily_result"); + const wrap=document.getElementById("daily_result_wrap"); el.innerText=data.result; - el.style.display="block"; + if(wrap){ wrap.style.display="block"; } + else { el.style.display="block"; } loadReviews(); }); } @@ -1135,8 +1181,10 @@ function genWeekly(){ fetch("/ai_weekly_review",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`start_date=${encodeURIComponent(s)}&end_date=${encodeURIComponent(e)}`}) .then(r=>r.json()).then(data=>{ const el=document.getElementById("weekly_result"); + const wrap=document.getElementById("weekly_result_wrap"); el.innerText=data.result; - el.style.display="block"; + if(wrap){ wrap.style.display="block"; } + else { el.style.display="block"; } loadReviews(); }); }