From c8eeb699796b28a814daea342ed6b9409ea1560b Mon Sep 17 00:00:00 2001 From: Bohdan Zhemelinskyi Date: Mon, 14 Feb 2022 21:05:10 +0000 Subject: [PATCH 01/50] fixedPhoneLock --- ...hangeLockSettingsInMeetingCmdMsgHdlr.scala | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeLockSettingsInMeetingCmdMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeLockSettingsInMeetingCmdMsgHdlr.scala index 0517248f0d..d424532bdb 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeLockSettingsInMeetingCmdMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ChangeLockSettingsInMeetingCmdMsgHdlr.scala @@ -3,6 +3,7 @@ package org.bigbluebutton.core.apps.users import org.bigbluebutton.LockSettingsUtil import org.bigbluebutton.common2.msgs._ import org.bigbluebutton.core.apps.{ PermissionCheck, RightsManagementTrait } +import org.bigbluebutton.core.models._ import org.bigbluebutton.core.running.OutMsgRouter import org.bigbluebutton.core.running.MeetingActor import org.bigbluebutton.core2.MeetingStatus2x @@ -42,6 +43,25 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr extends RightsManagementTrait { if (!oldPermissions.disableMic && settings.disableMic) { // Apply lock settings when disableMic from false to true. LockSettingsUtil.enforceLockSettingsForAllVoiceUsers(liveMeeting, outGW) + + // Dial-in + def buildLockMessage(meetingId: String, userId: String, lockedBy: String, locked: Boolean): BbbCommonEnvCoreMsg = { + val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, userId) + val envelope = BbbCoreEnvelope(UserLockedInMeetingEvtMsg.NAME, routing) + val body = UserLockedInMeetingEvtMsgBody(userId, locked, lockedBy) + val header = BbbClientMsgHeader(UserLockedInMeetingEvtMsg.NAME, meetingId, userId) + val event = UserLockedInMeetingEvtMsg(header, body) + + BbbCommonEnvCoreMsg(envelope, event) + } + + VoiceUsers.findAll(liveMeeting.voiceUsers) foreach { vu => + if (vu.intId.startsWith(IntIdPrefixType.DIAL_IN)) { // only Dial-in users need this + val eventExplicitLock = buildLockMessage(liveMeeting.props.meetingProp.intId, vu.intId, msg.body.setBy, settings.disableMic) + outGW.send(eventExplicitLock) + } + } + } if (!oldPermissions.disableCam && settings.disableCam) { From 0506928367c77c7ab1075c0fb420cac8668f960a Mon Sep 17 00:00:00 2001 From: Daniel Schreiber Date: Sun, 29 May 2022 19:24:53 +0200 Subject: [PATCH 02/50] Fix: only show breakout room in user list when user is in breakout room The user list in the main room showed user being in breakout rooms who already left a breakout room closes #14982 --- .../user-participants/user-list-item/component.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/component.jsx index 518718f342..172ad51569 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/component.jsx @@ -653,6 +653,7 @@ class UserListItem extends PureComponent { user, intl, isThisMeetingLocked, + userInBreakout, userLastBreakout, isMe, isRTL, @@ -746,7 +747,7 @@ class UserListItem extends PureComponent { if (LABEL.guest) userNameSub.push(intl.formatMessage(messages.guest)); } - if (userLastBreakout) { + if (userInBreakout && userLastBreakout) { userNameSub.push( From e43c83b7ba501d74b31cdad8ce9b7c8917525189 Mon Sep 17 00:00:00 2001 From: Ramon Souza Date: Mon, 30 May 2022 16:40:14 -0300 Subject: [PATCH 03/50] fix restoreOnUpdate --- .../ui/components/presentation/component.jsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx index 3e9aa80322..e6c2208116 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx @@ -73,6 +73,7 @@ class Presentation extends PureComponent { zoom: 100, fitToWidth: false, isFullscreen: false, + hadPresentation: false, }; this.currentPresentationToastId = null; @@ -158,8 +159,7 @@ class Presentation extends PureComponent { intl, } = this.props; - const { presentationWidth, presentationHeight } = this.state; - + const { presentationWidth, presentationHeight, hadPresentation } = this.state; const { numCameras: prevNumCameras, presentationBounds: prevPresentationBounds, @@ -210,6 +210,11 @@ class Presentation extends PureComponent { render: this.renderCurrentPresentationToast(), }); } + + if (layoutSwapped && restoreOnUpdate && currentSlide && hadPresentation) { + toggleSwapLayout(layoutContextDispatch); + this.setState({ hadPresentation: false }); + } } if (prevProps?.slidePosition && slidePosition) { @@ -254,6 +259,10 @@ class Presentation extends PureComponent { value: currentSlide.num, }); } + + if (prevProps.currentSlide && !currentSlide) { + this.setState({ hadPresentation: true }); + } } componentWillUnmount() { From b467050bc7593a35c2de870ccb8fa7dcc127491f Mon Sep 17 00:00:00 2001 From: Joao Victor Date: Fri, 3 Jun 2022 12:12:44 -0300 Subject: [PATCH 04/50] improvement: make the close button of the user details modal receive focus on open and improve its styling; close the user details modal when an element outside the modal receives focus --- .../src/components/UserDetails/component.jsx | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/bbb-learning-dashboard/src/components/UserDetails/component.jsx b/bbb-learning-dashboard/src/components/UserDetails/component.jsx index 1a363d8cbb..10aae7975b 100644 --- a/bbb-learning-dashboard/src/components/UserDetails/component.jsx +++ b/bbb-learning-dashboard/src/components/UserDetails/component.jsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect } from 'react'; +import React, { useContext, useEffect, useRef } from 'react'; import ReactDOM from 'react-dom'; import { FormattedMessage, FormattedNumber, FormattedTime, injectIntl, @@ -14,15 +14,35 @@ const UserDatailsComponent = (props) => { if (!isOpen) return null; + const modal = useRef(); + const closeButton = useRef(); + useEffect(() => { - const handler = (e) => { + const keydownhandler = (e) => { if (e.code === 'Escape') dispatch({ type: 'closeModal' }); }; - window.addEventListener('keydown', handler); - return () => window.removeEventListener('keydown', handler); + const focusHandler = () => { + if (modal.current && document.activeElement) { + if (!modal.current.contains(document.activeElement)) { + dispatch({ type: 'closeModal' }); + } + } + }; + + window.addEventListener('keydown', keydownhandler); + window.addEventListener('focus', focusHandler); + + return () => { + window.removeEventListener('keydown', keydownhandler); + window.removeEventListener('focus', focusHandler); + }; }, []); + useEffect(() => { + closeButton.current?.focus(); + }); + const { createdOn, endedOn, polls, users, } = dataJson; @@ -282,12 +302,14 @@ const UserDatailsComponent = (props) => { role="none" onClick={() => dispatch({ type: 'closeModal' })} /> -
+