[mirotalksfu] - improve chat emoji picker, update dep

هذا الالتزام موجود في:
Miroslav Pejic
2025-08-29 13:04:33 +02:00
الأصل 49df42e19c
التزام be7a55ec85
6 ملفات معدلة مع 68 إضافات و43 حذوفات

عرض الملف

@@ -78,7 +78,7 @@ let BRAND = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
title: '<strong>WebRTC SFU v1.9.50</strong>',
title: '<strong>WebRTC SFU v1.9.51</strong>',
html: `
<button
id="support-button"

عرض الملف

@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.9.50
* @version 1.9.51
*
*/
@@ -3245,6 +3245,15 @@ function handleUsernameEmojiPicker() {
getId('usernameInput').value += data.native;
toggleUsernameEmoji();
}
const chatEmojiButton = getId('chatEmojiButton');
const chatEmoji = getId('chatEmoji');
handleClickOutside(emojiUsernamePicker, chatEmojiButton, () => {
if (chatEmoji && chatEmoji.classList.contains('show')) {
chatEmoji.classList.remove('show');
chatEmojiButton.style.color = '#FFFFFF';
}
});
}
function handleChatEmojiPicker() {
@@ -3920,6 +3929,22 @@ function isHtml(str) {
return false;
}
function handleClickOutside(targetElement, triggerElement, callback, minWidth = 0) {
document.addEventListener('click', (e) => {
if (minWidth && window.innerWidth > minWidth) return;
let el = e.target;
let shouldExclude = false;
while (el) {
if (el instanceof HTMLElement && (el === targetElement || el === triggerElement)) {
shouldExclude = true;
break;
}
el = el.parentElement;
}
if (!shouldExclude) callback();
});
}
function getId(id) {
return document.getElementById(id);
}
@@ -5548,7 +5573,7 @@ function showAbout() {
position: 'center',
imageUrl: BRAND.about?.imageUrl && BRAND.about.imageUrl.trim() !== '' ? BRAND.about.imageUrl : image.about,
customClass: { image: 'img-about' },
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.9.50',
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.9.51',
html: `
<br />
<div id="about">

عرض الملف

@@ -9,7 +9,7 @@
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.9.50
* @version 1.9.51
*
*/