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
All checks were successful
Build and Push Docker Image / docker (push) Successful in 6s
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user