diff --git a/script.js b/script.js index f1bb512..517251c 100644 --- a/script.js +++ b/script.js @@ -261,6 +261,14 @@ function changeLanguage() { codeEditor.refresh(); } +function logout() { + if (socket) { + socket.close(); + } + localStorage.clear(); + location.reload(); +} + function sendMessage() { const inp = document.getElementById("msg-input"); if (!inp.value.trim()) return; diff --git a/style.css b/style.css index ccc57a0..6f9c825 100644 --- a/style.css +++ b/style.css @@ -127,10 +127,16 @@ body { border-bottom: 1px solid #333; } +.sidebar-footer { + padding: 15px; + border-top: 1px solid #444; +} + #users-list { list-style: none; padding: 10px; overflow-y: auto; + flex-grow: 1; } /* Main Content Area */ @@ -294,6 +300,22 @@ body { color: #fff; } +.logout-btn { + width: 100%; + padding: 10px; + background-color: #ff4757; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + font-weight: bold; + transition: background 0.3s; +} + +.logout-btn:hover { + background-color: #ff6b81; +} + .show-sidebar-btn { display: none; } From 55a87ae45e79db3282e31847e3e96bc31a04e15d Mon Sep 17 00:00:00 2001 From: martigiron01 Date: Sun, 8 Mar 2026 19:10:33 +0100 Subject: [PATCH 07/19] Room change close #8 --- index.html | 7 +- script.js | 28 +++++++- style.css | 197 ++++++++++++++++++++--------------------------------- 3 files changed, 106 insertions(+), 126 deletions(-) diff --git a/index.html b/index.html index 4676a93..6e9b220 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@