web: fix dark theme readability — explicit bright colors for all factor values

This commit is contained in:
jackyu66git
2026-06-24 18:27:41 +08:00
parent 0ba5b3bd71
commit f391020f78
2 changed files with 23 additions and 6 deletions
+12 -1
View File
@@ -26,21 +26,32 @@ async function loadState() {
// Factors
document.getElementById("f-price").textContent = d.price_structure.score.toFixed(0);
document.getElementById("f-price").style.color =
d.price_structure.score >= 60 ? "#3fb950" : d.price_structure.score >= 40 ? "#d29922" : "#f85149";
document.getElementById("f-price-sub").textContent = d.price_structure.label;
document.getElementById("f-price-narr").textContent = d.price_structure.narrative;
const b = d.breadth;
document.getElementById("f-breadth").textContent = b.score.toFixed(0);
document.getElementById("f-breadth").className = "factor-value " + (BUCKET_CLASS[b.bucket] || "");
document.getElementById("f-breadth").setAttribute("style",
"color: " + (b.bucket === "EXTREME" || b.bucket === "STRONG" ? "#3fb950" :
b.bucket === "WEAK" || b.bucket === "PANIC" ? "#f85149" :
b.bucket === "NORMAL" ? "#d29922" : "#e6edf3"));
document.getElementById("f-breadth-sub").textContent =
`${b.bucket} · T20=${b.top20.toFixed(0)} T50=${b.top50.toFixed(0)} div=${b.divergence > 0 ? "+" : ""}${b.divergence.toFixed(0)}`;
document.getElementById("f-breadth-narr").textContent = b.narrative;
document.getElementById("f-oi").textContent = d.oi_state;
document.getElementById("f-oi").style.color =
d.oi_state === "New Longs" ? "#3fb950" : d.oi_state === "New Shorts" ? "#f85149" :
d.oi_state === "Short Covering" ? "#d29922" : d.oi_state === "Long Exit" ? "#f85149" : "#e6edf3";
document.getElementById("f-oi-sub").textContent = `分数: ${d.oi_score.toFixed(0)}`;
document.getElementById("f-oi-narr").textContent = d.oi_narrative;
document.getElementById("f-vol").textContent = d.volatility;
document.getElementById("f-vol").style.color =
d.volatility === "LOW_VOL" ? "#58a6ff" : d.volatility === "NORMAL_VOL" ? "#e6edf3" :
d.volatility === "HIGH_VOL" ? "#d29922" : "#f85149";
document.getElementById("f-vol-sub").textContent = `分数: ${d.price_structure.score.toFixed(0)}`;
} catch (e) {
document.getElementById("db-status").textContent = "连接失败";