Port: Changes to layout toast's workflow
This commit is contained in:
parent
55d001ed21
commit
ec718ea43e
@ -6,6 +6,7 @@ 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.core.db.LayoutDAO
|
import org.bigbluebutton.core.db.LayoutDAO
|
||||||
|
import org.bigbluebutton.core2.message.senders.{ MsgBuilder }
|
||||||
|
|
||||||
trait BroadcastLayoutMsgHdlr extends RightsManagementTrait {
|
trait BroadcastLayoutMsgHdlr extends RightsManagementTrait {
|
||||||
this: LayoutApp2x =>
|
this: LayoutApp2x =>
|
||||||
@ -60,5 +61,18 @@ trait BroadcastLayoutMsgHdlr extends RightsManagementTrait {
|
|||||||
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
||||||
|
|
||||||
outGW.send(msgEvent)
|
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;
|
} = props;
|
||||||
|
|
||||||
const [selectedLayout, setSelectedLayout] = useState(application.selectedLayout);
|
const [selectedLayout, setSelectedLayout] = useState(application.selectedLayout);
|
||||||
|
const [updateAllUsed, setUpdateAllUsed] = useState(false);
|
||||||
|
|
||||||
const BASE_NAME = window.meetingClientSettings.public.app.basename;
|
const BASE_NAME = window.meetingClientSettings.public.app.basename;
|
||||||
|
|
||||||
@ -44,6 +45,14 @@ 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',
|
||||||
|
},
|
||||||
|
layoutToastLabelAutoOff: {
|
||||||
|
id: 'app.layout.modal.layoutToastLabelAutoOff',
|
||||||
|
description: 'Layout toast label',
|
||||||
|
},
|
||||||
layoutToastLabel: {
|
layoutToastLabel: {
|
||||||
id: 'app.layout.modal.layoutToastLabel',
|
id: 'app.layout.modal.layoutToastLabel',
|
||||||
description: 'Layout toast label',
|
description: 'Layout toast label',
|
||||||
@ -83,6 +92,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, setLocalSettings);
|
updateSettings(obj, intlMessages.layoutToastLabel, setLocalSettings);
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
};
|
};
|
||||||
|
@ -44,6 +44,15 @@ export default injectIntl(injectCurrentUser(withTracker(({ intl, currentUser })
|
|||||||
return UserService.UserLeftMeetingAlert(obj);
|
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(
|
return notify(
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id={obj.messageId}
|
id={obj.messageId}
|
||||||
|
@ -1276,6 +1276,7 @@
|
|||||||
"app.debugWindow.form.chatLoggerLabel": "Test Chat Logger Levels",
|
"app.debugWindow.form.chatLoggerLabel": "Test Chat Logger Levels",
|
||||||
"app.debugWindow.form.button.apply": "Apply",
|
"app.debugWindow.form.button.apply": "Apply",
|
||||||
"app.layout.modal.title": "Layouts",
|
"app.layout.modal.title": "Layouts",
|
||||||
|
"app.layoutUpdate.label": "Layout updates applied to everyone",
|
||||||
"app.layout.modal.update": "Update",
|
"app.layout.modal.update": "Update",
|
||||||
"app.layout.modal.updateAll": "Update everyone",
|
"app.layout.modal.updateAll": "Update everyone",
|
||||||
"app.layout.modal.layoutLabel": "Select your layout",
|
"app.layout.modal.layoutLabel": "Select your layout",
|
||||||
@ -1283,6 +1284,8 @@
|
|||||||
"app.layout.modal.layoutToastLabel": "Layout settings changed",
|
"app.layout.modal.layoutToastLabel": "Layout settings changed",
|
||||||
"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.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.custom": "Custom layout",
|
||||||
"app.layout.style.smart": "Smart layout",
|
"app.layout.style.smart": "Smart layout",
|
||||||
"app.layout.style.presentationFocus": "Focus on presentation",
|
"app.layout.style.presentationFocus": "Focus on presentation",
|
||||||
|
Loading…
Reference in New Issue
Block a user