update header chat count on websocket update message

pull/122/head
mummified-corroding-granny 2023-02-16 00:14:05 +00:00
parent 0c2128811f
commit 642651a08c
2 changed files with 2 additions and 1 deletions

View File

@ -196,6 +196,7 @@ textbox.addEventListener("keyup", function(e) {
socket.on('online', function(data){
document.getElementsByClassName('board-chat-count')[0].innerHTML = data[0].length
document.getElementById('chat-count-header-bar').innerHTML = data[0].length
const admin_level = parseInt(document.getElementById('admin_level').value)
let online = ''
let online2 = '<b>Users Online</b>'

View File

@ -157,7 +157,7 @@
<li class="nav-item d-none d-lg-flex align-items-center justify-content-center text-center mx-1">
<a class="nav-link position-relative" href="/chat">
<i class="fas fa-messages" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Chat"></i>
<b class="text-lg" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Users in chat right now">
<b id="chat-count-header-bar" class="text-lg" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Users in chat right now">
{{loggedin_chat}}
</b>
</a>