[mirotalksfu] - improve tippy
هذا الالتزام موجود في:
@@ -209,24 +209,27 @@ function initClient() {
|
|||||||
// ####################################################
|
// ####################################################
|
||||||
|
|
||||||
function refreshMainButtonsToolTipPlacement() {
|
function refreshMainButtonsToolTipPlacement() {
|
||||||
const placement = BtnsBarPosition.options[BtnsBarPosition.selectedIndex].value == 'vertical' ? 'right' : 'top-end';
|
if (!DetectRTC.isMobileDevice) {
|
||||||
setTippy('shareButton', 'Share room', placement);
|
const placement =
|
||||||
setTippy('hideMeButton', 'Toggle hide self view', placement);
|
BtnsBarPosition.options[BtnsBarPosition.selectedIndex].value == 'vertical' ? 'right' : 'top-end';
|
||||||
setTippy('startAudioButton', 'Start the audio', placement);
|
setTippy('shareButton', 'Share room', placement);
|
||||||
setTippy('stopAudioButton', 'Stop the audio', placement);
|
setTippy('hideMeButton', 'Toggle hide self view', placement);
|
||||||
setTippy('startVideoButton', 'Start the video', placement);
|
setTippy('startAudioButton', 'Start the audio', placement);
|
||||||
setTippy('stopVideoButton', 'Stop the video', placement);
|
setTippy('stopAudioButton', 'Stop the audio', placement);
|
||||||
setTippy('startScreenButton', 'Start screen share', placement);
|
setTippy('startVideoButton', 'Start the video', placement);
|
||||||
setTippy('stopScreenButton', 'Stop screen share', placement);
|
setTippy('stopVideoButton', 'Stop the video', placement);
|
||||||
setTippy('raiseHandButton', 'Raise your hand', placement);
|
setTippy('startScreenButton', 'Start screen share', placement);
|
||||||
setTippy('lowerHandButton', 'Lower your hand', placement);
|
setTippy('stopScreenButton', 'Stop screen share', placement);
|
||||||
setTippy('swapCameraButton', 'Swap the camera', placement);
|
setTippy('raiseHandButton', 'Raise your hand', placement);
|
||||||
setTippy('chatButton', 'Toggle the chat', placement);
|
setTippy('lowerHandButton', 'Lower your hand', placement);
|
||||||
setTippy('participantsButton', 'Toggle participants', placement);
|
setTippy('swapCameraButton', 'Swap the camera', placement);
|
||||||
setTippy('whiteboardButton', 'Toggle the whiteboard', placement);
|
setTippy('chatButton', 'Toggle the chat', placement);
|
||||||
setTippy('settingsButton', 'Toggle the settings', placement);
|
setTippy('participantsButton', 'Toggle participants', placement);
|
||||||
setTippy('aboutButton', 'About this project', placement);
|
setTippy('whiteboardButton', 'Toggle the whiteboard', placement);
|
||||||
setTippy('exitButton', 'Leave room', placement);
|
setTippy('settingsButton', 'Toggle the settings', placement);
|
||||||
|
setTippy('aboutButton', 'About this project', placement);
|
||||||
|
setTippy('exitButton', 'Leave room', placement);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ####################################################
|
// ####################################################
|
||||||
@@ -235,14 +238,18 @@ function refreshMainButtonsToolTipPlacement() {
|
|||||||
|
|
||||||
function setTippy(elem, content, placement, allowHTML = false) {
|
function setTippy(elem, content, placement, allowHTML = false) {
|
||||||
const element = document.getElementById(elem);
|
const element = document.getElementById(elem);
|
||||||
if (element._tippy) {
|
if (element) {
|
||||||
element._tippy.destroy();
|
if (element._tippy) {
|
||||||
|
element._tippy.destroy();
|
||||||
|
}
|
||||||
|
tippy(element, {
|
||||||
|
content: content,
|
||||||
|
placement: placement,
|
||||||
|
allowHTML: allowHTML,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.warn('setTippy element not found with content', content);
|
||||||
}
|
}
|
||||||
tippy(element, {
|
|
||||||
content: content,
|
|
||||||
placement: placement,
|
|
||||||
allowHTML: allowHTML,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ####################################################
|
// ####################################################
|
||||||
|
|||||||
@@ -2158,11 +2158,19 @@ class RoomClient {
|
|||||||
|
|
||||||
setTippy(elem, content, placement, allowHTML = false) {
|
setTippy(elem, content, placement, allowHTML = false) {
|
||||||
if (DetectRTC.isMobileDevice) return;
|
if (DetectRTC.isMobileDevice) return;
|
||||||
tippy(this.getId(elem), {
|
const element = this.getId(elem);
|
||||||
content: content,
|
if (element) {
|
||||||
placement: placement,
|
if (element._tippy) {
|
||||||
allowHTML: allowHTML,
|
element._tippy.destroy();
|
||||||
});
|
}
|
||||||
|
tippy(element, {
|
||||||
|
content: content,
|
||||||
|
placement: placement,
|
||||||
|
allowHTML: allowHTML,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.warn('setTippy element not found with content', content);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setVideoAvatarImgName(elemId, peer_name) {
|
setVideoAvatarImgName(elemId, peer_name) {
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم