Tagesverlust-Meldung kompakt und im Feld TAG P/L (v=215)
User-Vorgabe. Das breite Banner ueber der Karte ist weg; an seine Stelle tritt
`#cb-mini` direkt neben dem Tages-P/L.
vorher: "⚠ Tagesverlust -46,28 € — Stopp bei -55 € (85 % erreicht)"
als eigene Zeile ueber der ganzen Karte
jetzt : TAG P/L -46,28 85 % (CB)
drei Zeichen neben der Zahl, bernstein ab 60 %, rot bei "⛔ Stopp"
⚠ Die Zahl steht jetzt dort, wo sie gelesen wird: direkt an dem Wert, der den
Breaker ausloest, und neben dem Knopf, der ihn schaltet. Der vollstaendige Text
steckt im Tooltip - kompakt heisst hier "weniger Flaeche", nicht "weniger
Information".
⚠ Das alte `#circuit-banner` bleibt als Halter im DOM und wird weiter befuellt;
ausgeblendet wird es per CSS (`.circuit{display:none}`). Zurueckholen ist damit
eine einzige Zeile - und der Render-Pfad bleibt unveraendert, statt zwei Wege zu
haben, die auseinanderlaufen koennen.
Live gegengeprueft: TAG P/L enthaelt cb-mini UND btn-cb, 0 doppelte IDs, und
beim aktuellen Stand (-46,28 von -54,58) zeigt es "85 %" in Bernstein.
Pipeline A-G gruen, 97 Tests, 14 render*-Funktionen, deployt.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8ba036291d
commit
db0de81ef6
+31
-2
@@ -910,7 +910,36 @@ function renderStructure(s) {
|
||||
|
||||
// Circuit Breaker — roter Banner wenn ausgelöst, bernstein wenn nah (>60% des Limits).
|
||||
function renderCircuitBreaker(cb) {
|
||||
const el = $("circuit-banner");
|
||||
// ⚠⚠ KOMPAKT und IM Feld TAG P/L (User-Vorgabe 2026-08-21). Das breite
|
||||
// Banner über der Karte ist per CSS ausgeblendet; `#cb-mini` hängt direkt
|
||||
// an der Zahl, die den Breaker auslöst — dort wird sie auch gelesen.
|
||||
// ⚠ Das alte Element bleibt als Halter im DOM und wird weiter befüllt,
|
||||
// damit ein Zurückholen eine einzige CSS-Zeile ist.
|
||||
{
|
||||
const mini = $streng("cb-mini");
|
||||
if (mini) {
|
||||
if (!cb || !cb.enabled) {
|
||||
mini.textContent = ""; mini.className = "cb-mini";
|
||||
mini.title = "Tagesverlust-Stopp ist AUS.";
|
||||
} else if (cb.tripped) {
|
||||
mini.textContent = "⛔ Stopp";
|
||||
mini.className = "cb-mini tripped";
|
||||
mini.title = `Circuit Breaker AUSGELÖST — Tagesverlust ${fmt(cb.day_total, 2)} € `
|
||||
+ `erreicht (Limit −${fmt(cb.limit_eur, 0)} €). Keine Auto-Trades mehr heute.`;
|
||||
} else if (cb.limit_eur && cb.day_total < 0) {
|
||||
const pct = Math.round(100 * Math.abs(cb.day_total) / cb.limit_eur);
|
||||
mini.textContent = pct + " %";
|
||||
mini.className = "cb-mini" + (pct >= 60 ? " near" : "");
|
||||
mini.title = `${pct} % des Tagesverlust-Limits verbraucht `
|
||||
+ `(${fmt(cb.day_total, 2)} von −${fmt(cb.limit_eur, 0)} €). Bei 100 % `
|
||||
+ `schließt der Bot und sperrt Auto-Trades bis morgen.`;
|
||||
} else {
|
||||
mini.textContent = ""; mini.className = "cb-mini";
|
||||
mini.title = `Tagesverlust-Limit −${fmt(cb.limit_eur, 0)} € — heute noch nicht im Minus.`;
|
||||
}
|
||||
}
|
||||
}
|
||||
const el = $streng("circuit-banner");
|
||||
if (!el) return;
|
||||
if (!cb || !cb.enabled) { el.className = "circuit hidden"; el.textContent = ""; return; }
|
||||
const limit = cb.limit_eur, day = cb.day_total;
|
||||
@@ -2490,7 +2519,7 @@ async function closeSlot(slot, label, pnl) {
|
||||
// und der Browser zeigte Altes. Statt das jedes Mal von Hand zu diagnostizieren,
|
||||
// sagt die Seite es jetzt selbst.
|
||||
// ⚠ Bewusst SICHTBAR statt nur Konsole: die Konsole sieht am Handy niemand.
|
||||
const _JS_V = "214";
|
||||
const _JS_V = "215";
|
||||
{
|
||||
const htmlV = document.body && document.body.dataset
|
||||
? document.body.dataset.htmlV : null;
|
||||
|
||||
Reference in New Issue
Block a user