minor stuff done like BG color of chat window

This commit is contained in:
NigeParis 2025-11-26 20:43:08 +01:00 committed by apetitco
parent 18956ee953
commit d9d3ada6a0
4 changed files with 16 additions and 11 deletions

View file

@ -62,7 +62,8 @@
flex
items-center
justify-center
bg-gray-100;
bg-[#43536b];
}
.mainboxDisplay {

View file

@ -5,8 +5,7 @@
Chat Box <span id="t-username"></span>
</h1><br>
<button id="b-clear" class="btn-style absolute top-6 right-6">Clear Text</button>
<button id="b-help" class="btn-style absolute top-18 left-6">Connected</button>
<p>Welcome <span id="username"></span></p></br>
<button id="b-help" class="btn-style absolute top-16 left-6">Connected</button>
<div id="t-chatbox" class="chatbox-style"></div>
</br>
<div class="flex gap-2">

View file

@ -43,9 +43,13 @@ document.addEventListener("visibilitychange", async () => {
if (socketId == undefined) return;
if (document.visibilityState === "hidden") {
let userName = await updateUser();
oldName = userName?.name || "undefined";
localStorage.setItem("oldName", oldName);
socketId.emit("client_left");
oldName = userName?.name || undefined;
if (oldName === undefined) return;
localStorage.setItem('oldName', oldName);
socketId.emit('client_left', {
user: userName?.name,
why: 'tab window hidden - socket not dead',
});
return;
}
if (document.visibilityState === "visible") {