feat: enforce playlist selection before starting the game and update playlist handling
All checks were successful
Build and Push Docker Image / docker (push) Successful in 6s

This commit is contained in:
2025-10-12 22:55:03 +02:00
parent 17faca1f46
commit 0e51e233c3
5 changed files with 51 additions and 14 deletions

View File

@@ -121,7 +121,14 @@ export function wireUi() {
$room.classList.add('hidden');
});
wire($startGame, 'click', () => sendMsg({ type: 'start_game' }));
wire($startGame, 'click', () => {
// Validate playlist selection before starting
if (!state.room?.state?.playlist) {
showToast('⚠️ Bitte wähle zuerst eine Playlist aus!');
return;
}
sendMsg({ type: 'start_game' });
});
wire($readyChk, 'change', (e) => {
const val = !!e.target.checked;