From 6d0a0ce7a7e0742b4a59bac02aad54406785f08a Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Mon, 4 Sep 2023 18:27:02 +0200 Subject: [PATCH] [mirotalksfu] - add recent room --- app/src/Server.js | 12 ++++++++++-- public/css/landing.css | 20 ++++++++++++++++++++ public/views/landing.html | 17 +++++++++++++++++ public/views/newroom.html | 16 ++++++++++++++++ 4 files changed, 63 insertions(+), 2 deletions(-) diff --git a/app/src/Server.js b/app/src/Server.js index ff191d47..5f67c661 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -586,7 +586,9 @@ function startServer() { let cmd = words[0]; switch (cmd) { case 'privacy': - room.getPeers().get(socket.id).updatePeerInfo({ type: cmd, status: words[2] == 'true' }); + room.getPeers() + .get(socket.id) + .updatePeerInfo({ type: cmd, status: words[2] == 'true' }); break; default: break; @@ -943,7 +945,13 @@ function startServer() { await room.getPeers().get(socket.id).updatePeerInfo(data); - let producer_id = await room.produce(socket.id, producerTransportId, rtpParameters, kind, appData.mediaType); + let producer_id = await room.produce( + socket.id, + producerTransportId, + rtpParameters, + kind, + appData.mediaType, + ); log.debug('Produce', { kind: kind, diff --git a/public/css/landing.css b/public/css/landing.css index 23c3d5ef..cc8c3b38 100644 --- a/public/css/landing.css +++ b/public/css/landing.css @@ -1921,3 +1921,23 @@ main { width: 300px; } } + +.last-room { + display: none; + /*inline-flex*/ +} +.last-room a { + font-size: 16px; + line-height: 24px; + letter-spacing: -0.1px; + font-weight: 600; + color: #8a94a7; + text-decoration: none; + line-height: 16px; + padding: 8px 24px; +} + +.last-room a:hover { + color: #097dea; + transition: all 0.3s ease-in-out; +} diff --git a/public/views/landing.html b/public/views/landing.html index 83b83a87..231707a8 100644 --- a/public/views/landing.html +++ b/public/views/landing.html @@ -152,6 +152,7 @@ const roomName = filterXSS(document.getElementById('roomName').value); if (roomName) { window.location.href = '/join/' + roomName; + window.localStorage.lastRoom = roomName; } else { alert('Room name empty!\nPlease pick a room name.'); } @@ -159,6 +160,22 @@ +
+ Your recent room: + +
+ diff --git a/public/views/newroom.html b/public/views/newroom.html index a8ab670c..01184c59 100755 --- a/public/views/newroom.html +++ b/public/views/newroom.html @@ -158,6 +158,22 @@ +
+ Your recent room: + +
+