bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/user-list/container.jsx

62 lines
2.4 KiB
React
Raw Normal View History

2017-07-12 21:18:26 +08:00
import React from 'react';
2017-12-07 00:53:16 +08:00
import PropTypes from 'prop-types';
import { withTracker } from 'meteor/react-meteor-data';
2017-03-16 00:21:26 +08:00
import { meetingIsBreakout } from '/imports/ui/components/app/service';
import Meetings from '/imports/api/meetings';
import getFromUserSettings from '/imports/ui/services/users-settings';
2017-07-12 21:18:26 +08:00
import Service from './service';
import UserList from './component';
2016-05-20 02:22:56 +08:00
2017-12-07 00:53:16 +08:00
const propTypes = {
openChats: PropTypes.arrayOf(String).isRequired,
users: PropTypes.arrayOf(Object).isRequired,
currentUser: PropTypes.shape({}).isRequired,
meeting: PropTypes.shape({}).isRequired,
isBreakoutRoom: PropTypes.bool.isRequired,
getAvailableActions: PropTypes.func.isRequired,
normalizeEmojiName: PropTypes.func.isRequired,
isMeetingLocked: PropTypes.func.isRequired,
isPublicChat: PropTypes.func.isRequired,
setEmojiStatus: PropTypes.func.isRequired,
assignPresenter: PropTypes.func.isRequired,
removeUser: PropTypes.func.isRequired,
2017-12-07 00:53:16 +08:00
toggleVoice: PropTypes.func.isRequired,
2018-09-29 05:32:52 +08:00
muteAllUsers: PropTypes.func.isRequired,
muteAllExceptPresenter: PropTypes.func.isRequired,
2017-12-07 00:53:16 +08:00
changeRole: PropTypes.func.isRequired,
roving: PropTypes.func.isRequired,
getGroupChatPrivate: PropTypes.func.isRequired,
2017-12-07 00:53:16 +08:00
};
2018-06-05 03:43:54 +08:00
const UserListContainer = props => <UserList {...props} />;
2016-05-20 02:22:56 +08:00
2017-12-07 00:53:16 +08:00
UserListContainer.propTypes = propTypes;
export default withTracker(({ chatID, compact }) => ({
2016-06-07 00:45:30 +08:00
users: Service.getUsers(),
meeting: Meetings.findOne({}),
2018-10-27 03:57:37 +08:00
hasBreakoutRoom: Service.hasBreakoutRoom(),
2016-06-28 21:10:20 +08:00
currentUser: Service.getCurrentUser(),
openChats: Service.getOpenChats(chatID),
2017-03-16 02:03:58 +08:00
isBreakoutRoom: meetingIsBreakout(),
2017-08-16 22:56:31 +08:00
getAvailableActions: Service.getAvailableActions,
normalizeEmojiName: Service.normalizeEmojiName,
2017-09-07 02:32:29 +08:00
isMeetingLocked: Service.isMeetingLocked,
isPublicChat: Service.isPublicChat,
setEmojiStatus: Service.setEmojiStatus,
assignPresenter: Service.assignPresenter,
removeUser: Service.removeUser,
toggleVoice: Service.toggleVoice,
2018-09-29 05:32:52 +08:00
muteAllUsers: Service.muteAllUsers,
muteAllExceptPresenter: Service.muteAllExceptPresenter,
changeRole: Service.changeRole,
roving: Service.roving,
2018-03-21 03:35:28 +08:00
CustomLogoUrl: Service.getCustomLogoUrl(),
compact,
getGroupChatPrivate: Service.getGroupChatPrivate,
handleEmojiChange: Service.setEmojiStatus,
getEmojiList: Service.getEmojiList(),
getEmoji: Service.getEmoji(),
showBranding: getFromUserSettings('displayBrandingArea', Meteor.settings.public.app.branding.displayBrandingArea),
}))(UserListContainer);