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