From 971d7cc2b01b207d2b21e0725dc188b986a1db88 Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Sat, 9 Dec 2023 14:44:33 +0100 Subject: [PATCH] [mirotalksfu] - gix typo --- public/css/GroupChat.css | 3 ++- public/js/Room.js | 2 +- public/js/RoomClient.js | 16 ++++++++++------ public/views/Room.html | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/public/css/GroupChat.css b/public/css/GroupChat.css index 1a966f22..53bd3261 100644 --- a/public/css/GroupChat.css +++ b/public/css/GroupChat.css @@ -138,7 +138,7 @@ } .all-participants-img:hover { - background-color: #000000; + background-color: lime; transition: all 0.3s ease-in-out; } @@ -170,6 +170,7 @@ /* Chat history */ .chat .chat-history { padding: 20px; + height: calc(100vh - 210px); min-height: 490px; max-height: 490px; border-bottom: var(--border); diff --git a/public/js/Room.js b/public/js/Room.js index c4eccf97..a02bf640 100644 --- a/public/js/Room.js +++ b/public/js/Room.js @@ -1251,7 +1251,7 @@ function handleButtons() { }; chatButton.onclick = () => { rc.toggleChat(); - if (rc.isMobileDevice) { + if (DetectRTC.isMobileDevice) { rc.toggleShowParticipants(); } }; diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index d254463f..bb11da25 100644 --- a/public/js/RoomClient.js +++ b/public/js/RoomClient.js @@ -3175,6 +3175,11 @@ class RoomClient { } } + isPlistOpen() { + const plist = this.getId('plist'); + return plist.classList.contains('hidden'); + } + async toggleChat() { const chatRoom = this.getId('chatRoom'); chatRoom.classList.toggle('show'); @@ -3196,15 +3201,14 @@ class RoomClient { toggleShowParticipants() { const plist = this.getId('plist'); const chat = this.getId('chat'); - const chatHistory = this.getId('chatHistory'); plist.classList.toggle('hidden'); - const isParticipantsListHidden = plist.classList.contains('hidden'); + const isParticipantsListHidden = this.isPlistOpen(); chat.style.marginLeft = isParticipantsListHidden ? 0 : '300px'; chat.style.borderLeft = isParticipantsListHidden ? 'none' : '1px solid rgb(255 255 255 / 32%)'; - if (this.isChatPinned) chat.style.display = isParticipantsListHidden ? 'block' : 'none'; - chatHistory.style.height = isParticipantsListHidden ? 'calc(100vh - 210px)' : '490px'; + if (this.isChatPinned) elemDisplay(chat.id, isParticipantsListHidden); this.toggleChatHistorySize(isParticipantsListHidden && (this.isChatPinned || this.isChatMaximized)); plist.style.width = this.isChatPinned || this.isMobileDevice ? '100%' : '300px'; + plist.style.position = this.isMobileDevice ? 'fixed' : 'absolute'; } toggleChatHistorySize(max = true) { @@ -3257,7 +3261,7 @@ class RoomClient { resizeVideoMedia(); chatRoom.style.resize = 'none'; if (!this.isMobileDevice) this.makeUnDraggable(chatRoom, chatHeader); - if (!plist.classList.contains('hidden')) this.toggleShowParticipants(); + if (!this.isPlistOpen()) this.toggleShowParticipants(); if (chatRoom.classList.contains('container')) chatRoom.classList.remove('container'); } @@ -3277,7 +3281,7 @@ class RoomClient { setColor(chatTogglePin, 'white'); resizeVideoMedia(); if (!this.isMobileDevice) this.makeDraggable(chatRoom, chatHeader); - if (plist.classList.contains('hidden')) this.toggleShowParticipants(); + if (this.isPlistOpen()) this.toggleShowParticipants(); if (!chatRoom.classList.contains('container')) chatRoom.classList.add('container'); } diff --git a/public/views/Room.html b/public/views/Room.html index 767a0f2b..83d9c236 100644 --- a/public/views/Room.html +++ b/public/views/Room.html @@ -1019,7 +1019,7 @@ access to use this app.