feat: Implement client-side game logic and UI with WebSocket message handlers, including a winner popup and confetti animation.
All checks were successful
Build and Push Docker Image / docker (push) Successful in 9s

This commit is contained in:
2026-01-04 12:14:53 +01:00
parent c9be49d988
commit 8ca744cd5b
5 changed files with 181 additions and 9 deletions

View File

@@ -105,10 +105,19 @@ export function wireUi() {
});
}
// Auto-uppercase room code input for better UX
if ($roomCode) {
wire($roomCode, "input", () => {
const pos = $roomCode.selectionStart;
$roomCode.value = $roomCode.value.toUpperCase();
$roomCode.setSelectionRange(pos, pos);
});
}
wire($createRoom, "click", () => sendMsg({ type: "create_room" }));
wire($joinRoom, "click", () => {
const code = $roomCode.value.trim();
const code = $roomCode.value.trim().toUpperCase();
if (code) sendMsg({ type: "join_room", roomId: code });
});