[mirotalksfu] - improve save poll output
هذا الالتزام موجود في:
@@ -44,7 +44,7 @@ dependencies: {
|
|||||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.5.14
|
* @version 1.5.15
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mirotalksfu",
|
"name": "mirotalksfu",
|
||||||
"version": "1.5.14",
|
"version": "1.5.15",
|
||||||
"description": "WebRTC SFU browser-based video calls",
|
"description": "WebRTC SFU browser-based video calls",
|
||||||
"main": "Server.js",
|
"main": "Server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
|
|||||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.5.14
|
* @version 1.5.15
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -4279,7 +4279,7 @@ function showAbout() {
|
|||||||
imageUrl: image.about,
|
imageUrl: image.about,
|
||||||
customClass: { image: 'img-about' },
|
customClass: { image: 'img-about' },
|
||||||
position: 'center',
|
position: 'center',
|
||||||
title: 'WebRTC SFU v1.5.14',
|
title: 'WebRTC SFU v1.5.15',
|
||||||
html: `
|
html: `
|
||||||
<br />
|
<br />
|
||||||
<div id="about">
|
<div id="about">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
|
||||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
|
||||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||||
* @version 1.5.14
|
* @version 1.5.15
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -7937,13 +7937,8 @@ class RoomClient {
|
|||||||
createPollInputs(poll) {
|
createPollInputs(poll) {
|
||||||
const questionInput = `<input id="swal-input-question" class="swal2-input" value="${poll.question}">`;
|
const questionInput = `<input id="swal-input-question" class="swal2-input" value="${poll.question}">`;
|
||||||
const optionsInputs = poll.options
|
const optionsInputs = poll.options
|
||||||
.map(
|
.map((option, i) => `<input id="swal-input-option${i}" class="swal2-input" value="${option}">`)
|
||||||
(option, i) => `
|
|
||||||
<input id="swal-input-option${i}" class="swal2-input" value="${option}">
|
|
||||||
`,
|
|
||||||
)
|
|
||||||
.join('');
|
.join('');
|
||||||
|
|
||||||
return questionInput + optionsInputs;
|
return questionInput + optionsInputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7962,14 +7957,18 @@ class RoomClient {
|
|||||||
polls.forEach((poll, index) => {
|
polls.forEach((poll, index) => {
|
||||||
const question = poll.querySelector('.poll-h3').textContent;
|
const question = poll.querySelector('.poll-h3').textContent;
|
||||||
const options = poll.querySelectorAll('.options div label');
|
const options = poll.querySelectorAll('.options div label');
|
||||||
const optionsText = Array.from(options)
|
|
||||||
.map((option) => option.textContent)
|
const optionsText = Array.from(options).reduce((acc, option, index) => {
|
||||||
.join(', ');
|
acc[index + 1] = option.textContent.trim();
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
const votersList = poll.querySelector('ul');
|
const votersList = poll.querySelector('ul');
|
||||||
const voters = Array.from(votersList.querySelectorAll('li'))
|
const voters = Array.from(votersList.querySelectorAll('li')).reduce((acc, li) => {
|
||||||
.map((li) => li.textContent)
|
const [name, vote] = li.textContent.split(':').map((item) => item.trim());
|
||||||
.join('\n');
|
acc[name] = vote;
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
results.push({
|
results.push({
|
||||||
Poll: `${index + 1}`,
|
Poll: `${index + 1}`,
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم