feat: disable language toggle during active game

- Hide language toggle button when game is in progress
- Prevents language changes mid-game that could cause confusion
- Language button only visible in welcome and setup screens
- Auto-restores when returning to menu via exit button
This commit is contained in:
2026-01-06 18:32:27 +01:00
parent b05a59706c
commit f4b361016e

View File

@@ -1022,11 +1022,15 @@ function confirmExitGame() {
function updateExitButtonVisibility() {
const exitBtn = document.getElementById('exit-game');
// Show exit button in all phases except welcome and setup
const langBtn = document.getElementById('language-toggle');
// Show exit button and hide language toggle in all phases except welcome and setup
if (state.phase !== 'welcome' && state.phase !== 'setup') {
exitBtn.classList.add('visible');
if (langBtn) langBtn.style.display = 'none';
} else {
exitBtn.classList.remove('visible');
if (langBtn) langBtn.style.display = 'inline-flex';
}
}