[mirotalksfu] - add missing, fix typo
هذا الالتزام موجود في:
@@ -225,6 +225,7 @@ BRAND_HTML_INJECTION=true # Enable HTML injection for br
|
|||||||
|
|
||||||
# Widget Configuration
|
# Widget Configuration
|
||||||
WIDGET_ENABLED=false # Enable branding widget (true|false)
|
WIDGET_ENABLED=false # Enable branding widget (true|false)
|
||||||
|
WIDGET_ROOM_ID=support-room # Widget room ID (default: support-room)
|
||||||
WIDGET_THEME=dark # Widget theme (dark|light)
|
WIDGET_THEME=dark # Widget theme (dark|light)
|
||||||
WIDGET_STATE=minimized # Widget initial state (normal|minimized|closed)
|
WIDGET_STATE=minimized # Widget initial state (normal|minimized|closed)
|
||||||
WIDGET_TYPE=support # Widget type (support)
|
WIDGET_TYPE=support # Widget type (support)
|
||||||
|
|||||||
@@ -995,30 +995,30 @@ module.exports = {
|
|||||||
* Supports dynamic configuration via environment variables.
|
* Supports dynamic configuration via environment variables.
|
||||||
*/
|
*/
|
||||||
widget: {
|
widget: {
|
||||||
enabled: process.env.BRAND_WIDGET_ENABLED === 'true',
|
enabled: process.env.WIDGET_ENABLED === 'true',
|
||||||
domain: process.env.WIDGET_DOMAIN || null, // sfu.mirotalk.com
|
roomId: process.env.WIDGET_ROOM_ID || 'support-room',
|
||||||
theme: process.env.BRAND_WIDGET_THEME || 'dark',
|
theme: process.env.WIDGET_THEME || 'dark',
|
||||||
widgetState: process.env.BRAND_WIDGET_STATE || 'minimized',
|
widgetState: process.env.WIDGET_STATE || 'minimized',
|
||||||
widgetType: process.env.BRAND_WIDGET_TYPE || 'support',
|
widgetType: process.env.WIDGET_TYPE || 'support',
|
||||||
supportWidget: {
|
supportWidget: {
|
||||||
position: process.env.BRAND_WIDGET_SUPPORT_POSITION || 'top-right',
|
position: process.env.WIDGET_SUPPORT_POSITION || 'top-right',
|
||||||
expertImages: process.env.BRAND_WIDGET_SUPPORT_EXPERT_IMAGES
|
expertImages: process.env.WIDGET_SUPPORT_EXPERT_IMAGES
|
||||||
? process.env.BRAND_WIDGET_SUPPORT_EXPERT_IMAGES.split(splitChar)
|
? process.env.WIDGET_SUPPORT_EXPERT_IMAGES.split(splitChar)
|
||||||
.map((url) => url.trim())
|
.map((url) => url.trim())
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
: [
|
: [
|
||||||
'https://photo.cloudron.pocketsolution.net/uploads/original/95/7d/a5f7f7a2c89a5fee7affda5f013c.jpeg',
|
'https://photo.cloudron.pocketsolution.net/uploads/original/95/7d/a5f7f7a2c89a5fee7affda5f013c.jpeg',
|
||||||
],
|
],
|
||||||
checkOnlineStatus: process.env.BRAND_WIDGET_SUPPORT_CHECK_ONLINE_STATUS === 'true',
|
checkOnlineStatus: process.env.WIDGET_SUPPORT_CHECK_ONLINE_STATUS === 'true',
|
||||||
isOnline: process.env.BRAND_WIDGET_SUPPORT_IS_ONLINE !== 'false',
|
isOnline: process.env.WIDGET_SUPPORT_IS_ONLINE !== 'false',
|
||||||
customMessages: {
|
customMessages: {
|
||||||
heading: process.env.BRAND_WIDGET_SUPPORT_HEADING || 'Need Help?',
|
heading: process.env.WIDGET_SUPPORT_HEADING || 'Need Help?',
|
||||||
subheading:
|
subheading:
|
||||||
process.env.BRAND_WIDGET_SUPPORT_SUBHEADING || 'Get instant support from our expert team!',
|
process.env.WIDGET_SUPPORT_SUBHEADING || 'Get instant support from our expert team!',
|
||||||
connectText: process.env.BRAND_WIDGET_SUPPORT_CONNECT_TEXT || 'connect in < 5 seconds',
|
connectText: process.env.WIDGET_SUPPORT_CONNECT_TEXT || 'connect in < 5 seconds',
|
||||||
onlineText: process.env.BRAND_WIDGET_SUPPORT_ONLINE_TEXT || 'We are online',
|
onlineText: process.env.WIDGET_SUPPORT_ONLINE_TEXT || 'We are online',
|
||||||
offlineText: process.env.BRAND_WIDGET_SUPPORT_OFFLINE_TEXT || 'We are offline',
|
offlineText: process.env.WIDGET_SUPPORT_OFFLINE_TEXT || 'We are offline',
|
||||||
poweredBy: process.env.BRAND_WIDGET_SUPPORT_POWERED_BY || 'Powered by MiroTalk SFU',
|
poweredBy: process.env.WIDGET_SUPPORT_POWERED_BY || 'Powered by MiroTalk SFU',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ const guestJoinRoomButton = document.getElementById('guestJoinRoomButton');
|
|||||||
let BRAND = {
|
let BRAND = {
|
||||||
widget: {
|
widget: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
roomId: 'support-room',
|
||||||
theme: 'dark',
|
theme: 'dark',
|
||||||
widgetState: 'minimized',
|
widgetState: 'minimized',
|
||||||
widgetType: 'support',
|
widgetType: 'support',
|
||||||
@@ -222,7 +223,7 @@ function customizeWidget() {
|
|||||||
if (BRAND.widget?.enabled) {
|
if (BRAND.widget?.enabled) {
|
||||||
if (typeof MiroTalkWidget !== 'undefined') {
|
if (typeof MiroTalkWidget !== 'undefined') {
|
||||||
const domain = window.location.host;
|
const domain = window.location.host;
|
||||||
const roomId = 'support-room';
|
const roomId = BRAND.widget?.roomId || 'support-room';
|
||||||
const userName = 'guest-' + Math.floor(Math.random() * 10000);
|
const userName = 'guest-' + Math.floor(Math.random() * 10000);
|
||||||
new MiroTalkWidget(domain, roomId, userName, BRAND.widget);
|
new MiroTalkWidget(domain, roomId, userName, BRAND.widget);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم