diff --git a/views/1v1_spielfeld.ejs b/views/1v1_spielfeld.ejs index f414da8..fbc29d4 100644 --- a/views/1v1_spielfeld.ejs +++ b/views/1v1_spielfeld.ejs @@ -297,17 +297,14 @@ } }); - socket.on("match_cancelled", (data) => { - const lock = document.getElementById("board-lock-overlay"); - if (lock) { - lock.innerHTML = ` -
-
⏰ Zeit abgelaufen
-
${data.message || "Match abgebrochen."}
-
- `; + socket.on("match_cancelled", () => { + // Popup im Parent-Fenster schließen (Spielfeld läuft im iframe) + if (window.parent && window.parent !== window) { + window.parent.document.getElementById("arena-backdrop")?.remove(); + window.parent.document.getElementById("arena-popup")?.remove(); + } else { + window.close(); } - // Aufgabe-Logik kommt hier rein }); function handleAufgeben() {