Add player name visibility toggle and enhance display logic in lobby and results screens
Some checks failed
Publish Docker image / Push Docker image to Docker Hub (push) Failing after 3m43s
Some checks failed
Publish Docker image / Push Docker image to Docker Hub (push) Failing after 3m43s
This commit is contained in:
@ -28,7 +28,8 @@ class GameManager {
|
||||
settings: {
|
||||
songsPerPlayer: 3,
|
||||
maxPlayers: 10,
|
||||
minPlayers: 3
|
||||
minPlayers: 3,
|
||||
hidePlayerNames: false
|
||||
},
|
||||
players: [{
|
||||
id: hostId,
|
||||
@ -225,6 +226,11 @@ class GameManager {
|
||||
return { error: 'Max players must be between 3 and 20' };
|
||||
}
|
||||
|
||||
// Validate boolean settings
|
||||
if (settings.hidePlayerNames !== undefined && typeof settings.hidePlayerNames !== 'boolean') {
|
||||
settings.hidePlayerNames = Boolean(settings.hidePlayerNames);
|
||||
}
|
||||
|
||||
// Update settings
|
||||
lobby.settings = {
|
||||
...lobby.settings,
|
||||
|
Reference in New Issue
Block a user