diff --git a/frappe/hooks.py b/frappe/hooks.py index 7587b2f4e3..d7a459e3c3 100755 --- a/frappe/hooks.py +++ b/frappe/hooks.py @@ -188,9 +188,10 @@ sounds = [ # {"name": "alert", "src": "/assets/frappe/sounds/alert.mp3"}, # {"name": "chime", "src": "/assets/frappe/sounds/chime.mp3"}, - # frappe chat sounds + # frappe.chat sounds { "name": "chat-message", "src": "/assets/frappe/sounds/chat-message.mp3", "volume": 0.1 }, { "name": "chat-notification", "src": "/assets/frappe/sounds/chat-notification.mp3", "volume": 0.1 } + # frappe.chat sounds ] bot_parsers = [ diff --git a/frappe/public/css/chat.css b/frappe/public/css/chat.css index 28a73390a5..18d218b667 100644 --- a/frappe/public/css/chat.css +++ b/frappe/public/css/chat.css @@ -302,6 +302,9 @@ a.no-decoration:active { overflow-y: auto; padding: 0 1px 0 1px; } +.frappe-chat > .frappe-chat-popper > .frappe-chat-popper-collapse > .panel .frappe-chat-room-list > li > a { + border-radius: 0px !important; +} .frappe-chat > .frappe-chat-popper > .frappe-chat-popper-collapse > .panel .frappe-chat-room-list .media .media-heading, .frappe-chat > .frappe-chat-popper > .frappe-chat-popper-collapse > .panel .frappe-chat-room-list .media .media-subtitle { white-space: nowrap; @@ -311,6 +314,19 @@ a.no-decoration:active { vertical-align: middle; max-width: 180px; } +.frappe-chat > .frappe-chat-popper > .frappe-chat-popper-collapse > .panel .frappe-chat-room-list .message-count { + background: #ff5858; + display: inline-block; + padding: 5px; + color: white; + border-radius: 50%; + font-size: 12px; + height: 20px; + line-height: 10px; + text-align: center; + min-width: 20px; + margin-top: 4px; +} .frappe-chat > .frappe-chat-popper > .frappe-chat-popper-collapse > .panel .chat-list.list-group { height: 390px; overflow-y: scroll; @@ -351,7 +367,7 @@ a.no-decoration:active { border-radius: 0px !important; } .frappe-chat .panel .frappe-chat-form .hint-list.list-group { - margin: 0px !important; + margin: 0px; max-height: 150px; overflow-y: auto; } @@ -363,3 +379,15 @@ a.no-decoration:active { .frappe-chat .panel .frappe-chat-form .hint-list.list-group .hint-list-item.list-group-item:last-child a { text-decoration: none; } +.chat-message { + background: #E8DDFF; + padding: 5px 15px; + margin: 5px; + border-radius: 5px; + display: inline-block; +} +.seen-check { + font-size: 12px; + display: inline-block; + margin-left: 5px; +} diff --git a/frappe/public/js/frappe/chat.js b/frappe/public/js/frappe/chat.js index a7f737776c..ca6f6dbdc4 100644 --- a/frappe/public/js/frappe/chat.js +++ b/frappe/public/js/frappe/chat.js @@ -1015,7 +1015,9 @@ frappe.provide('frappe.chat.sound') frappe.chat.sound.play = function (name, volume = 0.1) { // frappe._.play_sound(`chat-${name}`) - const $audio = $(`