From 8de7ecf0ffdd85eb241a3376f4dffbff5b681ca7 Mon Sep 17 00:00:00 2001 From: Jacob Date: Sat, 28 Mar 2026 12:34:43 -0400 Subject: [PATCH] Frontend fixes. --- client/public/style.css | 1 - client/public/wsModule.js | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/client/public/style.css b/client/public/style.css index 94b065c..2f7c911 100644 --- a/client/public/style.css +++ b/client/public/style.css @@ -59,7 +59,6 @@ button:active { .msg { margin-bottom: 2px; - display: inline-flexbox; flex-direction: row; align-items: stretch; justify-content: flex-start; diff --git a/client/public/wsModule.js b/client/public/wsModule.js index eebd5b8..a8bbc99 100644 --- a/client/public/wsModule.js +++ b/client/public/wsModule.js @@ -73,6 +73,7 @@ export function initWebSocket( usersListEl.innerHTML = groups.length ? "Online: " + groups.join(", ") : "Online: ?"; + renderChat(chatEl, inputContainer); break; } case "join_evt": { @@ -85,6 +86,7 @@ export function initWebSocket( ); const groups = getGroupedUsers(); usersListEl.innerHTML = "Online: " + groups.join(", "); + renderChat(chatEl, inputContainer); break; } case "leave_evt": { @@ -98,6 +100,7 @@ export function initWebSocket( removeUser(sid); const groups = getGroupedUsers(); usersListEl.innerHTML = "Online: " + groups.join(", "); + renderChat(chatEl, inputContainer); break; } case "name_evt": { @@ -112,6 +115,7 @@ export function initWebSocket( ); const groups = getGroupedUsers(); usersListEl.innerHTML = "Online: " + groups.join(", "); + renderChat(chatEl, inputContainer); break; } case "msg_evt": { @@ -148,6 +152,7 @@ export function initWebSocket( notifyDirectReply(username, content); } } + renderChat(chatEl, inputContainer); break; } case "msg_ack": { @@ -164,6 +169,7 @@ export function initWebSocket( setReplyTo(sid); } } + renderChat(chatEl, inputContainer); break; } case "name_ack": { @@ -173,6 +179,7 @@ export function initWebSocket( `Name change failed: ${new Option(status).innerHTML}`, ); } + renderChat(chatEl, inputContainer); break; } case "ping": { @@ -182,9 +189,8 @@ export function initWebSocket( } default: console.warn("Unknown packet type:", packet.type); + renderChat(chatEl, inputContainer); } - - renderChat(chatEl, inputContainer); }; socket.onerror = (err) => {