[mirotalksfu] - extend api room password

هذا الالتزام موجود في:
Miroslav Pejic
2022-07-10 11:05:56 +02:00
الأصل 67c0e17133
التزام 2a8cd5577c
13 ملفات معدلة مع 85 إضافات و46 حذوفات

عرض الملف

@@ -2522,33 +2522,39 @@ class RoomClient {
if (emit) {
switch (action) {
case 'lock':
Swal.fire({
allowOutsideClick: false,
allowEscapeKey: false,
showDenyButton: true,
background: swalBackground,
imageUrl: image.locked,
input: 'text',
inputPlaceholder: 'Set Room password',
confirmButtonText: `OK`,
denyButtonText: `Cancel`,
showClass: {
popup: 'animate__animated animate__fadeInDown',
},
hideClass: {
popup: 'animate__animated animate__fadeOutUp',
},
inputValidator: (pwd) => {
if (!pwd) return 'Please enter the Room password';
this.RoomPassword = pwd;
},
}).then((result) => {
if (result.isConfirmed) {
data.password = this.RoomPassword;
this.socket.emit('roomAction', data);
this.roomStatus(action);
}
});
if (room_password) {
data.password = room_password;
this.socket.emit('roomAction', data);
this.roomStatus(action);
} else {
Swal.fire({
allowOutsideClick: false,
allowEscapeKey: false,
showDenyButton: true,
background: swalBackground,
imageUrl: image.locked,
input: 'text',
inputPlaceholder: 'Set Room password',
confirmButtonText: `OK`,
denyButtonText: `Cancel`,
showClass: {
popup: 'animate__animated animate__fadeInDown',
},
hideClass: {
popup: 'animate__animated animate__fadeOutUp',
},
inputValidator: (pwd) => {
if (!pwd) return 'Please enter the Room password';
this.RoomPassword = pwd;
},
}).then((result) => {
if (result.isConfirmed) {
data.password = this.RoomPassword;
this.socket.emit('roomAction', data);
this.roomStatus(action);
}
});
}
break;
case 'unlock':
this.socket.emit('roomAction', data);