chat: update header chat count on websocket update message #122

Merged
Aevann merged 1 commits from :chat-update-count-top-and-bottom-bars into master 2023-02-16 13:41:45 +00:00
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>