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

58 lines
1.5 KiB
React
Raw Normal View History

2017-07-12 21:18:26 +08:00
import React from 'react';
2016-05-20 02:22:56 +08:00
import { createContainer } from 'meteor/react-meteor-data';
2017-03-16 00:21:26 +08:00
import { meetingIsBreakout } from '/imports/ui/components/app/service';
import { makeCall } from '/imports/ui/services/api';
import Meetings from '/imports/api/2.0/meetings';
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-07-12 21:18:26 +08:00
const UserListContainer = (props) => {
const {
users,
currentUser,
openChats,
openChat,
userActions,
isBreakoutRoom,
children,
meeting,
2017-08-16 22:56:31 +08:00
getAvailableActions,
normalizeEmojiName,
isMeetingLocked,
isPublicChat,
2017-07-12 21:18:26 +08:00
} = props;
2016-05-20 02:22:56 +08:00
2017-07-12 21:18:26 +08:00
return (
<UserList
users={users}
meeting={meeting}
currentUser={currentUser}
openChats={openChats}
openChat={openChat}
isBreakoutRoom={isBreakoutRoom}
makeCall={makeCall}
userActions={userActions}
2017-08-16 22:56:31 +08:00
getAvailableActions={getAvailableActions}
normalizeEmojiName={normalizeEmojiName}
isMeetingLocked={isMeetingLocked}
isPublicChat={isPublicChat}
2017-07-12 21:18:26 +08:00
>
{children}
</UserList>
);
};
2016-05-20 02:22:56 +08:00
2016-06-28 21:10:20 +08:00
export default createContainer(({ params }) => ({
2016-06-07 00:45:30 +08:00
users: Service.getUsers(),
meeting: Meetings.findOne({}),
2016-06-28 21:10:20 +08:00
currentUser: Service.getCurrentUser(),
2016-06-30 22:45:19 +08:00
openChats: Service.getOpenChats(params.chatID),
openChat: params.chatID,
2016-06-28 21:10:20 +08:00
userActions: Service.userActions,
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,
2016-06-07 00:45:30 +08:00
}), UserListContainer);