gfhkjf
This commit is contained in:
parent
90db689e4b
commit
ae3e0033cf
@ -139,8 +139,14 @@ export async function loadEvents() {
|
||||
|
||||
document.addEventListener("keydown", e => {
|
||||
if (e.key === "Escape") {
|
||||
// Booster aktiv & noch nicht fertig → ESC komplett blockieren
|
||||
if (boosterUi.style.display !== "none" && (!allRevealed || isSpinning)) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
overlay.classList.remove("active");
|
||||
if (!isSpinning && allRevealed) { // ← ESC im Booster nur wenn fertig
|
||||
if (!isSpinning && allRevealed) {
|
||||
eventsGrid.style.display = "";
|
||||
boosterUi.style.display = "none";
|
||||
clearAllIntervals();
|
||||
@ -176,6 +182,7 @@ export async function loadEvents() {
|
||||
clearAllIntervals();
|
||||
isSpinning = false;
|
||||
allRevealed = false;
|
||||
window.__boosterLocked = false;
|
||||
|
||||
for (let i = 0; i < 5; i++) {
|
||||
const inner = body.querySelector(`#booster-slot-${i} .booster-slot-inner`);
|
||||
@ -236,6 +243,7 @@ export async function loadEvents() {
|
||||
if (!allCards.length) return;
|
||||
|
||||
isSpinning = true;
|
||||
window.__boosterLocked = true; // äußere Modals sperren
|
||||
|
||||
const stapel = body.querySelector("#booster-stapel");
|
||||
stapel.classList.add("used");
|
||||
@ -287,6 +295,7 @@ export async function loadEvents() {
|
||||
}
|
||||
|
||||
allRevealed = true;
|
||||
window.__boosterLocked = false; // äußere Modals wieder freigeben
|
||||
body.querySelector("#booster-hint").textContent = "Alle Karten erhalten! ✓";
|
||||
const backBtn = body.querySelector("#booster-back-btn");
|
||||
backBtn.style.opacity = "1";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user