improvements
Some checks failed
Snapshot Docker Image Build / verify-and-package (push) Successful in 1m34s
Snapshot Docker Image Build / build-and-publish-snapshot (push) Has been cancelled

This commit is contained in:
2026-04-22 20:44:12 +02:00
parent cb0b6f0719
commit 870e3c1ea8
3 changed files with 9 additions and 5 deletions

View File

@@ -123,14 +123,14 @@ public class GameWebSocketHandler extends TextWebSocketHandler {
"snapshot",
gameRoomService.getSnapshot(roomId, participantId)
);
synchronized (session) {
synchronized (sessions.get(session.getId())) {
session.sendMessage(new TextMessage(objectMapper.writeValueAsString(message)));
}
}
private void sendError(WebSocketSession session, String errorMessage) throws IOException {
ErrorMessage message = new ErrorMessage("error", errorMessage);
synchronized (session) {
synchronized (sessions.get(session.getId())) {
session.sendMessage(new TextMessage(objectMapper.writeValueAsString(message)));
}
}
@@ -150,10 +150,10 @@ public class GameWebSocketHandler extends TextWebSocketHandler {
private String requiredText(JsonNode payload, String fieldName) {
JsonNode value = payload.get(fieldName);
if (value == null || value.asText().isBlank()) {
if (value == null || value.asString().isBlank()) {
throw new GameRoomService.GameException("Feld " + fieldName + " fehlt.");
}
return value.asText();
return value.asString();
}
private int requiredInt(JsonNode payload, String fieldName) {

View File

@@ -144,6 +144,7 @@ async function enterRoom(payload) {
window.history.replaceState({}, "", `${window.location.pathname}?${params.toString()}`);
render();
connectSocket(true);
document.querySelector('.hero-card').hidden = true;
}
function connectSocket(forceReconnect = false) {

View File

@@ -23,7 +23,7 @@ body {
color: var(--ink);
background:
radial-gradient(circle at top left, rgba(214, 164, 58, 0.22), transparent 28%),
radial-gradient(circle at top right, rgba(41, 108, 168, 0.18), transparent 26%),
radial-gradient(circle at top right, rgba(41, 108, 168, 0.18), transparent 26%),a
linear-gradient(180deg, #efe2c4 0%, #f7f2e7 44%, #e8eef4 100%);
}
@@ -125,6 +125,9 @@ h1 {
.board-column {
display: grid;
gap: 1.25rem;
align-items: start;
justify-items: stretch;
align-content: start;
}
.panel {