diff --git a/static/js/chat_sockets.js b/static/js/chat_sockets.js index 4f0a522..da627f8 100644 --- a/static/js/chat_sockets.js +++ b/static/js/chat_sockets.js @@ -88,6 +88,13 @@ chatSocket.onmessage = function (e) { } } + if (data.unread_msgs_count > 0){ + let list_unrd = document.querySelectorAll(".unredmessages_value_text") + let i = 0 + for (i;i < list_unrd.length;i++){ + list_unrd[i].innerHTML = data.unread_msgs_count.toString() + } + } if (data.required_beep === true) { const beep = new Audio('/static/sounds/beep_2.mp3') beep.play() diff --git a/templates/blocks/b_user_profile.html b/templates/blocks/b_user_profile.html index 9507e50..9ff1db3 100644 --- a/templates/blocks/b_user_profile.html +++ b/templates/blocks/b_user_profile.html @@ -17,7 +17,13 @@
- Написать сообщение + Написать сообщение +
+
+ +
+
+