Merge pull request #19842 from Scroody/i-19819
Port: Changes to layout toast's workflow
This commit is contained in:
commit
beae4f6cb4
@ -6,6 +6,7 @@ import org.bigbluebutton.core.running.OutMsgRouter
|
||||
import org.bigbluebutton.core2.MeetingStatus2x
|
||||
import org.bigbluebutton.core.apps.{ PermissionCheck, RightsManagementTrait }
|
||||
import org.bigbluebutton.core.db.LayoutDAO
|
||||
import org.bigbluebutton.core2.message.senders.{ MsgBuilder }
|
||||
|
||||
trait BroadcastLayoutMsgHdlr extends RightsManagementTrait {
|
||||
this: LayoutApp2x =>
|
||||
@ -60,5 +61,18 @@ trait BroadcastLayoutMsgHdlr extends RightsManagementTrait {
|
||||
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
||||
|
||||
outGW.send(msgEvent)
|
||||
|
||||
if (body.pushLayout) {
|
||||
val notifyEvent = MsgBuilder.buildNotifyUserInMeetingEvtMsg(
|
||||
fromUserId,
|
||||
liveMeeting.props.meetingProp.intId,
|
||||
"info",
|
||||
"user",
|
||||
"app.layoutUpdate.label",
|
||||
"Notification to when the presenter changes size of cams",
|
||||
Vector()
|
||||
)
|
||||
outGW.send(notifyEvent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ const LayoutModalComponent = (props) => {
|
||||
} = props;
|
||||
|
||||
const [selectedLayout, setSelectedLayout] = useState(application.selectedLayout);
|
||||
const [updateAllUsed, setUpdateAllUsed] = useState(false);
|
||||
|
||||
const BASE_NAME = window.meetingClientSettings.public.app.cdn + window.meetingClientSettings.public.app.basename;
|
||||
|
||||
@ -44,6 +45,14 @@ const LayoutModalComponent = (props) => {
|
||||
id: 'app.layout.modal.layoutLabel',
|
||||
description: 'Layout label',
|
||||
},
|
||||
layoutToastLabelAuto: {
|
||||
id: 'app.layout.modal.layoutToastLabelAuto',
|
||||
description: 'Layout toast label',
|
||||
},
|
||||
layoutToastLabelAutoOff: {
|
||||
id: 'app.layout.modal.layoutToastLabelAutoOff',
|
||||
description: 'Layout toast label',
|
||||
},
|
||||
layoutToastLabel: {
|
||||
id: 'app.layout.modal.layoutToastLabel',
|
||||
description: 'Layout toast label',
|
||||
@ -83,6 +92,15 @@ const LayoutModalComponent = (props) => {
|
||||
application:
|
||||
{ ...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, setLocalSettings);
|
||||
setIsOpen(false);
|
||||
};
|
||||
|
@ -44,6 +44,15 @@ export default injectIntl(injectCurrentUser(withTracker(({ intl, currentUser })
|
||||
return UserService.UserLeftMeetingAlert(obj);
|
||||
}
|
||||
|
||||
if (obj.messageId === 'app.layoutUpdate.label') {
|
||||
const last = new Date(Session.get('lastLayoutUpdateNotification'));
|
||||
const now = new Date();
|
||||
if (now - last < 1000) {
|
||||
return {};
|
||||
}
|
||||
Session.set('lastLayoutUpdateNotification', now);
|
||||
}
|
||||
|
||||
return notify(
|
||||
<FormattedMessage
|
||||
id={obj.messageId}
|
||||
|
@ -1276,6 +1276,7 @@
|
||||
"app.debugWindow.form.chatLoggerLabel": "Test Chat Logger Levels",
|
||||
"app.debugWindow.form.button.apply": "Apply",
|
||||
"app.layout.modal.title": "Layouts",
|
||||
"app.layoutUpdate.label": "Layout updates applied to everyone",
|
||||
"app.layout.modal.update": "Update",
|
||||
"app.layout.modal.updateAll": "Update everyone",
|
||||
"app.layout.modal.layoutLabel": "Select your layout",
|
||||
@ -1283,6 +1284,8 @@
|
||||
"app.layout.modal.layoutToastLabel": "Layout settings changed",
|
||||
"app.layout.modal.layoutSingular": "Layout",
|
||||
"app.layout.modal.layoutBtnDesc": "Sets layout as selected option",
|
||||
"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.style.custom": "Custom layout",
|
||||
"app.layout.style.smart": "Smart layout",
|
||||
"app.layout.style.presentationFocus": "Focus on presentation",
|
||||
|
Loading…
Reference in New Issue
Block a user