2021-07-17 01:37:03 +08:00
|
|
|
import React from 'react';
|
2019-05-01 03:24:04 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
2019-09-07 04:28:02 +08:00
|
|
|
import ActionsBarService from '/imports/ui/components/actions-bar/service';
|
2021-11-11 21:10:31 +08:00
|
|
|
import BreakoutRoomService from '/imports/ui/components/breakout-room/service';
|
2019-05-01 03:24:04 +08:00
|
|
|
import CreateBreakoutRoomModal from './component';
|
2023-06-24 01:42:45 +08:00
|
|
|
import { isImportSharedNotesFromBreakoutRoomsEnabled, isImportPresentationWithAnnotationsFromBreakoutRoomsEnabled } from '/imports/ui/services/features';
|
2019-05-01 03:24:04 +08:00
|
|
|
|
2023-01-14 04:37:42 +08:00
|
|
|
const METEOR_SETTINGS_APP = Meteor.settings.public.app;
|
|
|
|
|
2021-08-09 22:24:02 +08:00
|
|
|
const CreateBreakoutRoomContainer = (props) => {
|
2023-01-23 23:35:43 +08:00
|
|
|
const { allowUserChooseRoomByDefault } = METEOR_SETTINGS_APP.breakouts;
|
|
|
|
const captureWhiteboardByDefault = METEOR_SETTINGS_APP.breakouts.captureWhiteboardByDefault
|
2023-01-19 23:33:08 +08:00
|
|
|
&& isImportPresentationWithAnnotationsFromBreakoutRoomsEnabled();
|
2023-01-23 23:35:43 +08:00
|
|
|
const captureSharedNotesByDefault = METEOR_SETTINGS_APP.breakouts.captureSharedNotesByDefault
|
2023-01-19 23:33:08 +08:00
|
|
|
&& isImportSharedNotesFromBreakoutRoomsEnabled();
|
2023-06-29 23:04:14 +08:00
|
|
|
const inviteModsByDefault = METEOR_SETTINGS_APP.breakouts.sendInvitationToAssignedModeratorsByDefault;
|
|
|
|
|
2021-08-09 22:24:02 +08:00
|
|
|
const { amIModerator } = props;
|
|
|
|
return (
|
|
|
|
amIModerator
|
|
|
|
&& (
|
2023-06-21 22:06:41 +08:00
|
|
|
<CreateBreakoutRoomModal
|
|
|
|
{...props}
|
2023-01-14 04:37:42 +08:00
|
|
|
{...{
|
2023-01-23 23:35:43 +08:00
|
|
|
allowUserChooseRoomByDefault,
|
|
|
|
captureWhiteboardByDefault,
|
|
|
|
captureSharedNotesByDefault,
|
2023-06-29 23:04:14 +08:00
|
|
|
inviteModsByDefault,
|
2023-01-14 04:37:42 +08:00
|
|
|
}}
|
|
|
|
/>
|
2021-08-09 22:24:02 +08:00
|
|
|
)
|
|
|
|
);
|
|
|
|
};
|
2021-07-17 01:37:03 +08:00
|
|
|
|
2019-05-01 03:24:04 +08:00
|
|
|
export default withTracker(() => ({
|
2019-09-07 04:28:02 +08:00
|
|
|
createBreakoutRoom: ActionsBarService.createBreakoutRoom,
|
|
|
|
getBreakouts: ActionsBarService.getBreakouts,
|
2021-11-11 21:10:31 +08:00
|
|
|
getLastBreakouts: ActionsBarService.getLastBreakouts,
|
|
|
|
getBreakoutUserWasIn: BreakoutRoomService.getBreakoutUserWasIn,
|
2022-03-24 21:56:07 +08:00
|
|
|
getUsersNotJoined: ActionsBarService.getUsersNotJoined,
|
2019-09-07 04:28:02 +08:00
|
|
|
sendInvitation: ActionsBarService.sendInvitation,
|
2020-01-22 23:31:53 +08:00
|
|
|
breakoutJoinedUsers: ActionsBarService.breakoutJoinedUsers(),
|
2019-09-07 04:28:02 +08:00
|
|
|
users: ActionsBarService.users(),
|
2021-11-11 21:10:31 +08:00
|
|
|
groups: ActionsBarService.groups(),
|
2021-02-04 21:59:13 +08:00
|
|
|
isMe: ActionsBarService.isMe,
|
2019-09-07 04:28:02 +08:00
|
|
|
meetingName: ActionsBarService.meetingName(),
|
2021-07-17 01:37:03 +08:00
|
|
|
amIModerator: ActionsBarService.amIModerator(),
|
2022-03-24 21:56:07 +08:00
|
|
|
moveUser: ActionsBarService.moveUser,
|
2021-07-17 01:37:03 +08:00
|
|
|
}))(CreateBreakoutRoomContainer);
|