[mirotalksfu] - move widget, fix version
هذا الالتزام موجود في:
@@ -34,40 +34,6 @@ const guestJoinRoomButton = document.getElementById('guestJoinRoomButton');
|
||||
|
||||
// app/src/config.js - ui.brand
|
||||
let BRAND = {
|
||||
widget: {
|
||||
enabled: false,
|
||||
roomId: 'support-room',
|
||||
theme: 'dark',
|
||||
widgetState: 'minimized',
|
||||
widgetType: 'support',
|
||||
supportWidget: {
|
||||
position: 'top-right',
|
||||
expertImages: [
|
||||
'https://photo.cloudron.pocketsolution.net/uploads/original/95/7d/a5f7f7a2c89a5fee7affda5f013c.jpeg',
|
||||
],
|
||||
buttons: {
|
||||
audio: true,
|
||||
video: true,
|
||||
screen: true,
|
||||
chat: true,
|
||||
join: true,
|
||||
},
|
||||
checkOnlineStatus: false,
|
||||
isOnline: true,
|
||||
customMessages: {
|
||||
heading: 'Need Help?',
|
||||
subheading: 'Get instant support from our expert team!',
|
||||
connectText: 'connect in < 5 seconds',
|
||||
onlineText: 'We are online',
|
||||
offlineText: 'We are offline',
|
||||
poweredBy: 'Powered by MiroTalk SFU',
|
||||
},
|
||||
alert: {
|
||||
enabled: false,
|
||||
type: 'email',
|
||||
},
|
||||
},
|
||||
},
|
||||
app: {
|
||||
language: 'en',
|
||||
name: 'MiroTalk SFU',
|
||||
@@ -141,6 +107,40 @@ let BRAND = {
|
||||
<hr />
|
||||
`,
|
||||
},
|
||||
widget: {
|
||||
enabled: false,
|
||||
roomId: 'support-room',
|
||||
theme: 'dark',
|
||||
widgetState: 'minimized',
|
||||
widgetType: 'support',
|
||||
supportWidget: {
|
||||
position: 'top-right',
|
||||
expertImages: [
|
||||
'https://photo.cloudron.pocketsolution.net/uploads/original/95/7d/a5f7f7a2c89a5fee7affda5f013c.jpeg',
|
||||
],
|
||||
buttons: {
|
||||
audio: true,
|
||||
video: true,
|
||||
screen: true,
|
||||
chat: true,
|
||||
join: true,
|
||||
},
|
||||
checkOnlineStatus: false,
|
||||
isOnline: true,
|
||||
customMessages: {
|
||||
heading: 'Need Help?',
|
||||
subheading: 'Get instant support from our expert team!',
|
||||
connectText: 'connect in < 5 seconds',
|
||||
onlineText: 'We are online',
|
||||
offlineText: 'We are offline',
|
||||
poweredBy: 'Powered by MiroTalk SFU',
|
||||
},
|
||||
alert: {
|
||||
enabled: false,
|
||||
type: 'email',
|
||||
},
|
||||
},
|
||||
},
|
||||
//...
|
||||
};
|
||||
|
||||
@@ -232,13 +232,18 @@ function customizeApp() {
|
||||
// WIDGET customize
|
||||
function customizeWidget() {
|
||||
if (BRAND.widget?.enabled) {
|
||||
const domain = window.location.host;
|
||||
const roomId = BRAND.widget?.roomId || 'support-room';
|
||||
const userName = 'guest-' + Math.floor(Math.random() * 10000);
|
||||
if (typeof MiroTalkWidget !== 'undefined') {
|
||||
const domain = window.location.host;
|
||||
const roomId = BRAND.widget?.roomId || 'support-room';
|
||||
const userName = 'guest-' + Math.floor(Math.random() * 10000);
|
||||
new MiroTalkWidget(domain, roomId, userName, BRAND.widget);
|
||||
} else {
|
||||
console.warn('MiroTalkWidget is not defined in the current context. Please check Widget.js loading.');
|
||||
console.warn('MiroTalkWidget is not defined in the current context. Please check Widget.js loading.', {
|
||||
domain,
|
||||
roomId,
|
||||
userName,
|
||||
widget: BRAND.widget,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم