Fix issues with lobby game settings UI

This commit is contained in:
Andrio Celos 2025-03-29 18:48:02 +11:00
parent 3e77d2afde
commit c531b92884
No known key found for this signature in database
GPG Key ID: A4B57A2FF4019E28

View File

@ -115,7 +115,7 @@ function clearUrlFromGame() {
function onGameSettingsChange() {
if (currentGame == null) return;
if (lobbyTimeLimitBox.value != currentGame.game.turnTimeLimit?.toString() ?? '')
if (lobbyTimeLimitBox.value != (currentGame.game.turnTimeLimit?.toString() ?? ''))
lobbyTimeLimitBox.value = currentGame.game.turnTimeLimit?.toString() ?? '';
lobbyAllowUpcomingCardsBox.checked = currentGame.game.allowUpcomingCards;
lobbyAllowCustomCardsBox.checked = currentGame.game.allowCustomCards;
@ -347,6 +347,7 @@ function setupWebSocket(gameID: string) {
case 'settingsChange':
currentGame.game.turnTimeLimit = payload.data.turnTimeLimit;
currentGame.game.allowUpcomingCards = payload.data.allowUpcomingCards;
currentGame.game.allowCustomCards = payload.data.allowCustomCards;
onGameSettingsChange();
break;
case 'join':