Changes to layout toast's workflow

This commit is contained in:
imdt 2023-09-12 10:42:55 -03:00
parent cae85dd8b2
commit 7bce5cf45a
5 changed files with 45 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import org.bigbluebutton.core.models.{ Layouts, LayoutsType }
import org.bigbluebutton.core.running.OutMsgRouter import org.bigbluebutton.core.running.OutMsgRouter
import org.bigbluebutton.core2.MeetingStatus2x import org.bigbluebutton.core2.MeetingStatus2x
import org.bigbluebutton.core.apps.{ PermissionCheck, RightsManagementTrait } import org.bigbluebutton.core.apps.{ PermissionCheck, RightsManagementTrait }
import org.bigbluebutton.core2.message.senders.{ MsgBuilder }
trait BroadcastLayoutMsgHdlr extends RightsManagementTrait { trait BroadcastLayoutMsgHdlr extends RightsManagementTrait {
this: LayoutApp2x => this: LayoutApp2x =>
@ -58,5 +59,16 @@ trait BroadcastLayoutMsgHdlr extends RightsManagementTrait {
val msgEvent = BbbCommonEnvCoreMsg(envelope, event) val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
outGW.send(msgEvent) outGW.send(msgEvent)
val notifyEvent = MsgBuilder.buildNotifyUserInMeetingEvtMsg(
fromUserId,
liveMeeting.props.meetingProp.intId,
"info",
"user",
"app.layoutUpdate.label",
"Notification to when the presenter changes dize of cams",
Vector()
)
outGW.send(notifyEvent)
} }
} }

View File

@ -20,6 +20,7 @@ const LayoutModalComponent = (props) => {
} = props; } = props;
const [selectedLayout, setSelectedLayout] = useState(application.selectedLayout); const [selectedLayout, setSelectedLayout] = useState(application.selectedLayout);
const [updateAllUsed, setUpdateAllUsed] = useState(false);
const BASE_NAME = Meteor.settings.public.app.basename; const BASE_NAME = Meteor.settings.public.app.basename;
@ -43,10 +44,18 @@ const LayoutModalComponent = (props) => {
id: 'app.layout.modal.layoutLabel', id: 'app.layout.modal.layoutLabel',
description: 'Layout label', description: 'Layout label',
}, },
layoutToastLabelAuto: {
id: 'app.layout.modal.layoutToastLabelAuto',
description: 'Layout toast label',
},
layoutToastLabel: { layoutToastLabel: {
id: 'app.layout.modal.layoutToastLabel', id: 'app.layout.modal.layoutToastLabel',
description: 'Layout toast label', description: 'Layout toast label',
}, },
layoutToastLabelAutoOff: {
id: 'app.layout.modal.layoutToastLabelAutoOff',
description: 'Layout toast label',
},
customLayout: { customLayout: {
id: 'app.layout.style.custom', id: 'app.layout.style.custom',
description: 'label for custom layout style', description: 'label for custom layout style',
@ -82,7 +91,15 @@ const LayoutModalComponent = (props) => {
application: application:
{ ...application, selectedLayout, pushLayout: updateAll }, { ...application, selectedLayout, pushLayout: updateAll },
}; };
if ((isModerator || isPresenter) && updateAll) {
updateSettings(obj, intlMessages.layoutToastLabelAuto);
setUpdateAllUsed(true);
} else if ((isModerator || isPresenter) && !updateAll && !updateAllUsed) {
updateSettings(obj, intlMessages.layoutToastLabelAutoOff);
setUpdateAllUsed(false);
} else {
updateSettings(obj, intlMessages.layoutToastLabel); updateSettings(obj, intlMessages.layoutToastLabel);
}
setIsOpen(false); setIsOpen(false);
}; };

View File

@ -9,6 +9,7 @@ import UserService from '/imports/ui/components/user-list/service';
export default injectIntl(withTracker(({ intl }) => { export default injectIntl(withTracker(({ intl }) => {
NotificationsCollection.find({}).observe({ NotificationsCollection.find({}).observe({
added: (obj) => { added: (obj) => {
console.log({obj});
NotificationsCollection.remove(obj); NotificationsCollection.remove(obj);
if (obj.messageId === 'app.userList.guest.pendingGuestAlert') { if (obj.messageId === 'app.userList.guest.pendingGuestAlert') {

View File

@ -7,6 +7,17 @@ import DropAreaContainer from './drop-areas/container';
import VideoProviderContainer from '/imports/ui/components/video-provider/container'; import VideoProviderContainer from '/imports/ui/components/video-provider/container';
import Storage from '/imports/ui/services/storage/session'; import Storage from '/imports/ui/services/storage/session';
import { colorContentBackground } from '/imports/ui/stylesheets/styled-components/palette'; import { colorContentBackground } from '/imports/ui/stylesheets/styled-components/palette';
import { defineMessages } from 'react-intl';
import {
isPresenter,
} from '/imports/ui/components/settings/service';
const intlMessages = defineMessages({
layoutToastLabelAuto: {
id: 'app.layout.modal.layoutToastLabelAuto',
description: 'Layout toast label',
},
});
const WebcamComponent = ({ const WebcamComponent = ({
cameraDock, cameraDock,

View File

@ -1093,6 +1093,7 @@
"app.video.meetingCamCapReached": "Meeting reached it's simultaneous cameras limit", "app.video.meetingCamCapReached": "Meeting reached it's simultaneous cameras limit",
"app.video.dropZoneLabel": "Drop here", "app.video.dropZoneLabel": "Drop here",
"app.fullscreenButton.label": "Make {0} fullscreen", "app.fullscreenButton.label": "Make {0} fullscreen",
"app.layoutUpdate.label": "Layout updates applied to everyone",
"app.fullscreenUndoButton.label": "Undo {0} fullscreen", "app.fullscreenUndoButton.label": "Undo {0} fullscreen",
"app.switchButton.expandLabel": "Expand screenshare video", "app.switchButton.expandLabel": "Expand screenshare video",
"app.switchButton.shrinkLabel": "Shrink screenshare video", "app.switchButton.shrinkLabel": "Shrink screenshare video",
@ -1253,6 +1254,8 @@
"app.layout.modal.layoutLabel": "Select your layout", "app.layout.modal.layoutLabel": "Select your layout",
"app.layout.modal.pushLayoutLabel": "Push to everyone", "app.layout.modal.pushLayoutLabel": "Push to everyone",
"app.layout.modal.layoutToastLabel": "Layout settings changed", "app.layout.modal.layoutToastLabel": "Layout settings changed",
"app.layout.modal.layoutToastLabelAuto": "Auto layout updates enabled, layout updates are now applied to everyone",
"app.layout.modal.layoutToastLabelAutoOff": "Auto layout updates disabled",
"app.layout.modal.layoutSingular": "Layout", "app.layout.modal.layoutSingular": "Layout",
"app.layout.modal.layoutBtnDesc": "Sets layout as selected option", "app.layout.modal.layoutBtnDesc": "Sets layout as selected option",
"app.layout.style.custom": "Custom layout", "app.layout.style.custom": "Custom layout",