Complete WebSocket

This commit is contained in:
2025-08-18 19:15:40 +03:00
Unverified
parent 6ecd885e7a
commit 06d183d6e4
6 changed files with 109 additions and 46 deletions
+2 -1
View File
@@ -4,7 +4,7 @@ import { API_BASE_URL } from "./config";
// Authentication and navigation handling
export let currentUser: User | null = null;
let authToken: string | null = null;
export let authToken: string | null = null;
// Helper function to get auth headers
@@ -39,6 +39,7 @@ export function showChat() {
document.getElementById('login-form')!.style.display = 'none';
document.getElementById('register-form')!.style.display = 'none';
document.getElementById('chat-interface')!.style.display = 'block';
loadMessages();
}
// Clear all alerts