From 6fd886ebc299480c2b06a924a0a763f38970d472 Mon Sep 17 00:00:00 2001 From: kicer Date: Wed, 22 Jul 2026 14:29:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=B3=A8=E9=94=80=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/public/index.html | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/server/public/index.html b/server/public/index.html index 7f576ce..e8729ed 100644 --- a/server/public/index.html +++ b/server/public/index.html @@ -139,9 +139,14 @@

小财记账

- +
+ + +
@@ -248,6 +253,16 @@ localStorage.removeItem('currentUser'); localStorage.removeItem('isAdmin'); } + function logout() { + if (ws) { ws.close(); ws = null; } + clearAuth(); + document.getElementById('login-page').classList.remove('hidden'); + document.getElementById('main-page').classList.add('hidden'); + currentRoom = null; + rooms = []; + document.getElementById('chat-list-container').innerHTML = ''; + document.getElementById('messages-container').innerHTML = ''; + } if (typeof marked !== 'undefined') marked.setOptions({ breaks: true, gfm: true, sanitize: false });