From f8c43426f3bd2e977c51bd690139cb045cbe59d0 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Mon, 7 Jul 2025 21:06:11 +0200 Subject: [PATCH] [mirotalksfu] - make whoAreYou page configurable --- .env.template | 6 ++++++ app/src/config.template.js | 13 +++++++++++++ package-lock.json | 12 ++++++------ package.json | 4 ++-- public/js/Brand.js | 30 +++++++++++++++++++++++++++++- public/js/Room.js | 4 ++-- public/js/RoomClient.js | 2 +- public/views/whoAreYou.html | 4 ++-- 8 files changed, 61 insertions(+), 14 deletions(-) diff --git a/.env.template b/.env.template index 17f02c00..10e4e321 100644 --- a/.env.template +++ b/.env.template @@ -248,6 +248,12 @@ SHOW_SPONSORS=true # Show sponsors (true|false) SHOW_ADVERTISERS=true # Show advertisers (true|false) SHOW_FOOTER=true # Show footer (true|false) +# Who Are You +WHO_ARE_YOU_TITLE="Who are you?" # Title +WHO_ARE_YOU_DESCRIPTION="If you're the presenter, please log in now.
Otherwise, kindly wait for the presenter to join." # Description +WHO_ARE_YOU_BUTTON_LOGIN_LABEL="LOGIN" # Login button label +WHO_ARE_YOU_JOIN_LABEL="JOIN ROOM" # Join button label + # About ABOUT_IMAGE_URL=../images/mirotalk-logo.gif # About section image SUPPORT_URL=https://codecanyon.net/user/miroslavpejic85 # Support link URL diff --git a/app/src/config.template.js b/app/src/config.template.js index 9906b15b..0dc253b7 100644 --- a/app/src/config.template.js +++ b/app/src/config.template.js @@ -1039,6 +1039,19 @@ module.exports = { footer: process.env.SHOW_FOOTER !== 'false', }, + /** + * Who Are You? Section + * --------------------- + * Prompts users to identify themselves before joining a room. + * Customizable text and button labels. + */ + whoAreYou: { + title: process.env.WHO_ARE_YOU_TITLE || 'Who are you?', + description: process.env.WHO_ARE_YOU_DESCRIPTION || "If you\'re the presenter, please log in now.
Otherwise, kindly wait for the presenter to join.", + buttonLoginLabel: process.env.WHO_ARE_YOU_BUTTON_LOGIN_LABEL || 'LOGIN', + buttonJoinLabel: process.env.WHO_ARE_YOU_JOIN_LABEL || 'JOIN ROOM', + }, + /** * About/Credits Section * --------------------- diff --git a/package-lock.json b/package-lock.json index e248efcb..18319dc6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mirotalksfu", - "version": "1.8.83", + "version": "1.8.84", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mirotalksfu", - "version": "1.8.83", + "version": "1.8.84", "license": "AGPL-3.0", "dependencies": { "@aws-sdk/client-s3": "^3.842.0", @@ -35,7 +35,7 @@ "jsonwebtoken": "^9.0.2", "mediasoup": "3.16.5", "mediasoup-client": "3.12.4", - "nodemailer": "^7.0.4", + "nodemailer": "^7.0.5", "openai": "^5.8.2", "qs": "6.14.0", "sanitize-filename": "^1.6.3", @@ -8306,9 +8306,9 @@ "license": "MIT" }, "node_modules/nodemailer": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-7.0.4.tgz", - "integrity": "sha512-9O00Vh89/Ld2EcVCqJ/etd7u20UhME0f/NToPfArwPEe1Don1zy4mAIz6ariRr7mJ2RDxtaDzN0WJVdVXPtZaw==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-7.0.5.tgz", + "integrity": "sha512-nsrh2lO3j4GkLLXoeEksAMgAOqxOv6QumNRVQTJwKH4nuiww6iC2y7GyANs9kRAxCexg3+lTWM3PZ91iLlVjfg==", "license": "MIT-0", "engines": { "node": ">=6.0.0" diff --git a/package.json b/package.json index 10dbeafb..8c7d2fb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalksfu", - "version": "1.8.83", + "version": "1.8.84", "description": "WebRTC SFU browser-based video calls", "main": "Server.js", "scripts": { @@ -83,7 +83,7 @@ "jsonwebtoken": "^9.0.2", "mediasoup": "3.16.5", "mediasoup-client": "3.12.4", - "nodemailer": "^7.0.4", + "nodemailer": "^7.0.5", "openai": "^5.8.2", "qs": "6.14.0", "sanitize-filename": "^1.6.3", diff --git a/public/js/Brand.js b/public/js/Brand.js index bb45eb34..0ea5f8c3 100644 --- a/public/js/Brand.js +++ b/public/js/Brand.js @@ -25,6 +25,11 @@ const poweredBy = document.getElementById('poweredBy'); const sponsors = document.getElementById('sponsors'); const advertisers = document.getElementById('advertisers'); const footer = document.getElementById('footer'); + +const whoAreYouTitle = document.getElementById('whoAreYouTitle'); +const whoAreYouDescription = document.getElementById('whoAreYouDescription'); +const presenterLoginButton = document.getElementById('presenterLoginButton'); +const guestJoinRoomButton = document.getElementById('guestJoinRoomButton'); //... // app/src/config.js - ui.brand @@ -62,9 +67,15 @@ let BRAND = { advertisers: true, footer: true, }, + whoAreYou: { + title: 'Who are you?', + description: "If you\'re the presenter, please log in now.
Otherwise, kindly wait for the presenter to join.", + buttonLoginLabel: 'LOGIN', + buttonJoinLabel: 'JOIN ROOM', + }, about: { imageUrl: '../images/mirotalk-logo.gif', - title: 'WebRTC SFU v1.8.83', + title: 'WebRTC SFU v1.8.84', html: `