[mirotalksfu] - move widget, fix version
هذا الالتزام موجود في:
@@ -988,52 +988,6 @@ module.exports = {
|
|||||||
*/
|
*/
|
||||||
htmlInjection: process.env.BRAND_HTML_INJECTION !== 'false',
|
htmlInjection: process.env.BRAND_HTML_INJECTION !== 'false',
|
||||||
|
|
||||||
/**
|
|
||||||
* Widget Configuration
|
|
||||||
* --------------------
|
|
||||||
* Controls the appearance and behavior of the support widget.
|
|
||||||
* Supports dynamic configuration via environment variables.
|
|
||||||
*/
|
|
||||||
widget: {
|
|
||||||
enabled: process.env.WIDGET_ENABLED === 'true',
|
|
||||||
roomId: process.env.WIDGET_ROOM_ID || 'support-room',
|
|
||||||
theme: process.env.WIDGET_THEME || 'dark',
|
|
||||||
widgetState: process.env.WIDGET_STATE || 'minimized',
|
|
||||||
widgetType: process.env.WIDGET_TYPE || 'support',
|
|
||||||
supportWidget: {
|
|
||||||
position: process.env.WIDGET_SUPPORT_POSITION || 'top-right',
|
|
||||||
expertImages: process.env.WIDGET_SUPPORT_EXPERT_IMAGES
|
|
||||||
? process.env.WIDGET_SUPPORT_EXPERT_IMAGES.split(splitChar)
|
|
||||||
.map((url) => url.trim())
|
|
||||||
.filter(Boolean)
|
|
||||||
: [
|
|
||||||
'https://photo.cloudron.pocketsolution.net/uploads/original/95/7d/a5f7f7a2c89a5fee7affda5f013c.jpeg',
|
|
||||||
],
|
|
||||||
buttons: {
|
|
||||||
audio: process.env.WIDGET_SUPPORT_BUTTON_AUDIO !== 'false',
|
|
||||||
video: process.env.WIDGET_SUPPORT_BUTTON_VIDEO !== 'false',
|
|
||||||
screen: process.env.WIDGET_SUPPORT_BUTTON_SCREEN !== 'false',
|
|
||||||
chat: process.env.WIDGET_SUPPORT_BUTTON_CHAT !== 'false',
|
|
||||||
join: process.env.WIDGET_SUPPORT_BUTTON_JOIN !== 'false',
|
|
||||||
},
|
|
||||||
checkOnlineStatus: process.env.WIDGET_SUPPORT_CHECK_ONLINE_STATUS === 'true',
|
|
||||||
isOnline: process.env.WIDGET_SUPPORT_IS_ONLINE !== 'false',
|
|
||||||
customMessages: {
|
|
||||||
heading: process.env.WIDGET_SUPPORT_HEADING || 'Need Help?',
|
|
||||||
subheading:
|
|
||||||
process.env.WIDGET_SUPPORT_SUBHEADING || 'Get instant support from our expert team!',
|
|
||||||
connectText: process.env.WIDGET_SUPPORT_CONNECT_TEXT || 'connect in < 5 seconds',
|
|
||||||
onlineText: process.env.WIDGET_SUPPORT_ONLINE_TEXT || 'We are online',
|
|
||||||
offlineText: process.env.WIDGET_SUPPORT_OFFLINE_TEXT || 'We are offline',
|
|
||||||
poweredBy: process.env.WIDGET_SUPPORT_POWERED_BY || 'Powered by MiroTalk SFU',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
alert: {
|
|
||||||
enabled: process.env.WIDGET_ALERT_ENABLED === 'true',
|
|
||||||
type: process.env.WIDGET_ALERT_TYPE || 'email',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
app: {
|
app: {
|
||||||
language: process.env.UI_LANGUAGE || 'en',
|
language: process.env.UI_LANGUAGE || 'en',
|
||||||
name: process.env.APP_NAME || 'MiroTalk SFU',
|
name: process.env.APP_NAME || 'MiroTalk SFU',
|
||||||
@@ -1156,6 +1110,53 @@ module.exports = {
|
|||||||
<hr />
|
<hr />
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Widget Configuration
|
||||||
|
* --------------------
|
||||||
|
* Controls the appearance and behavior of the support widget.
|
||||||
|
* Supports dynamic configuration via environment variables.
|
||||||
|
*/
|
||||||
|
widget: {
|
||||||
|
enabled: process.env.WIDGET_ENABLED === 'true',
|
||||||
|
roomId: process.env.WIDGET_ROOM_ID || 'support-room',
|
||||||
|
theme: process.env.WIDGET_THEME || 'dark',
|
||||||
|
widgetState: process.env.WIDGET_STATE || 'minimized',
|
||||||
|
widgetType: process.env.WIDGET_TYPE || 'support',
|
||||||
|
supportWidget: {
|
||||||
|
position: process.env.WIDGET_SUPPORT_POSITION || 'top-right',
|
||||||
|
expertImages: process.env.WIDGET_SUPPORT_EXPERT_IMAGES
|
||||||
|
? process.env.WIDGET_SUPPORT_EXPERT_IMAGES.split(splitChar)
|
||||||
|
.map((url) => url.trim())
|
||||||
|
.filter(Boolean)
|
||||||
|
: [
|
||||||
|
'https://photo.cloudron.pocketsolution.net/uploads/original/95/7d/a5f7f7a2c89a5fee7affda5f013c.jpeg',
|
||||||
|
],
|
||||||
|
buttons: {
|
||||||
|
audio: process.env.WIDGET_SUPPORT_BUTTON_AUDIO !== 'false',
|
||||||
|
video: process.env.WIDGET_SUPPORT_BUTTON_VIDEO !== 'false',
|
||||||
|
screen: process.env.WIDGET_SUPPORT_BUTTON_SCREEN !== 'false',
|
||||||
|
chat: process.env.WIDGET_SUPPORT_BUTTON_CHAT !== 'false',
|
||||||
|
join: process.env.WIDGET_SUPPORT_BUTTON_JOIN !== 'false',
|
||||||
|
},
|
||||||
|
checkOnlineStatus: process.env.WIDGET_SUPPORT_CHECK_ONLINE_STATUS === 'true',
|
||||||
|
isOnline: process.env.WIDGET_SUPPORT_IS_ONLINE !== 'false',
|
||||||
|
customMessages: {
|
||||||
|
heading: process.env.WIDGET_SUPPORT_HEADING || 'Need Help?',
|
||||||
|
subheading:
|
||||||
|
process.env.WIDGET_SUPPORT_SUBHEADING || 'Get instant support from our expert team!',
|
||||||
|
connectText: process.env.WIDGET_SUPPORT_CONNECT_TEXT || 'connect in < 5 seconds',
|
||||||
|
onlineText: process.env.WIDGET_SUPPORT_ONLINE_TEXT || 'We are online',
|
||||||
|
offlineText: process.env.WIDGET_SUPPORT_OFFLINE_TEXT || 'We are offline',
|
||||||
|
poweredBy: process.env.WIDGET_SUPPORT_POWERED_BY || 'Powered by MiroTalk SFU',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
alert: {
|
||||||
|
enabled: process.env.WIDGET_ALERT_ENABLED === 'true',
|
||||||
|
type: process.env.WIDGET_ALERT_TYPE || 'email',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
//...
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
4
package-lock.json
مولّد
4
package-lock.json
مولّد
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "mirotalksfu",
|
"name": "mirotalksfu",
|
||||||
"version": "1.9.38",
|
"version": "1.9.40",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "mirotalksfu",
|
"name": "mirotalksfu",
|
||||||
"version": "1.9.38",
|
"version": "1.9.40",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.864.0",
|
"@aws-sdk/client-s3": "^3.864.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mirotalksfu",
|
"name": "mirotalksfu",
|
||||||
"version": "1.9.39",
|
"version": "1.9.40",
|
||||||
"description": "WebRTC SFU browser-based video calls",
|
"description": "WebRTC SFU browser-based video calls",
|
||||||
"main": "Server.js",
|
"main": "Server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -34,40 +34,6 @@ const guestJoinRoomButton = document.getElementById('guestJoinRoomButton');
|
|||||||
|
|
||||||
// app/src/config.js - ui.brand
|
// app/src/config.js - ui.brand
|
||||||
let 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: {
|
app: {
|
||||||
language: 'en',
|
language: 'en',
|
||||||
name: 'MiroTalk SFU',
|
name: 'MiroTalk SFU',
|
||||||
@@ -141,6 +107,40 @@ let BRAND = {
|
|||||||
<hr />
|
<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
|
// WIDGET customize
|
||||||
function customizeWidget() {
|
function customizeWidget() {
|
||||||
if (BRAND.widget?.enabled) {
|
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') {
|
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);
|
new MiroTalkWidget(domain, roomId, userName, BRAND.widget);
|
||||||
} else {
|
} 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,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم