From 42a5452fc54cec6472605b98fcc304b6d6c99f37 Mon Sep 17 00:00:00 2001 From: borissedw Date: Sun, 13 Aug 2023 20:06:18 +0300 Subject: [PATCH] 0.0.133 --- static/js/chat_sockets.js | 7 +++++++ templates/blocks/b_user_profile.html | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) 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 @@
- Написать сообщение + Написать сообщение +
+
+ +
+
+