forked from MarseyWorld/MarseyWorld
chat: update header chat count on websocket update message (#122)
Kindly, Just a small lil PR to make sure the chat counts keep synchronized in /chat as users come and go Thanks, granny Reviewed-on: rDrama/rDrama#122 Co-authored-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net> Co-committed-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>master
parent
211110baef
commit
0c670299c0
|
@ -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>'
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue