diff --git a/api/static/dashboard.html b/api/static/dashboard.html index de2f039..f4d2b96 100644 --- a/api/static/dashboard.html +++ b/api/static/dashboard.html @@ -690,7 +690,10 @@ const money = (v) => (v === null || v === undefined || isNaN(+v)) ? "—" : (v < const esc = (s) => String(s ?? "").replace(/[&<>"']/g, c => ({"&":"&","<":"<",">":">",'"':""","'":"'"}[c])); const timeOf = (ts) => { try { return new Date(ts).toLocaleTimeString(); } catch { return "—"; } }; const signed = (el, v) => { - el.textContent = (v === null || v === undefined || isNaN(+v)) ? "—" : money(v); + // explicit "+" so gain/loss never rides on color alone (red-green CVD ~8% of + // males; the minus already prints, the plus must too) + el.textContent = (v === null || v === undefined || isNaN(+v)) ? "—" + : (+v > 0 ? "+" : "") + money(v); el.className = "value num " + (+v > 0 ? "pos" : +v < 0 ? "neg" : ""); };