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';
|
2018-01-08 12:44:42 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
2017-03-16 00:21:26 +08:00
|
|
|
import { meetingIsBreakout } from '/imports/ui/components/app/service';
|
2018-09-14 02:09:30 +08:00
|
|
|
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 = {
|
2019-01-14 21:23:35 +08:00
|
|
|
activeChats: PropTypes.arrayOf(String).isRequired,
|
2017-12-07 00:53:16 +08:00
|
|
|
currentUser: PropTypes.shape({}).isRequired,
|
2018-11-23 22:14:48 +08:00
|
|
|
getUsersId: PropTypes.func.isRequired,
|
2017-12-07 00:53:16 +08:00
|
|
|
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,
|
2018-01-10 06:28:48 +08:00
|
|
|
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,
|
2018-07-26 22:56:26 +08:00
|
|
|
getGroupChatPrivate: PropTypes.func.isRequired,
|
2019-01-29 23:17:09 +08:00
|
|
|
toggleUserLock: 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;
|
|
|
|
|
2018-06-05 03:11:11 +08:00
|
|
|
export default withTracker(({ chatID, compact }) => ({
|
2018-10-27 03:57:37 +08:00
|
|
|
hasBreakoutRoom: Service.hasBreakoutRoom(),
|
2018-11-23 22:14:48 +08:00
|
|
|
getUsersId: Service.getUsersId,
|
2016-06-28 21:10:20 +08:00
|
|
|
currentUser: Service.getCurrentUser(),
|
2019-01-14 21:23:35 +08:00
|
|
|
activeChats: Service.getActiveChats(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,
|
2017-09-22 22:24:24 +08:00
|
|
|
isPublicChat: Service.isPublicChat,
|
2017-09-29 02:19:57 +08:00
|
|
|
setEmojiStatus: Service.setEmojiStatus,
|
|
|
|
assignPresenter: Service.assignPresenter,
|
2018-01-10 06:28:48 +08:00
|
|
|
removeUser: Service.removeUser,
|
2017-09-29 02:19:57 +08:00
|
|
|
toggleVoice: Service.toggleVoice,
|
2018-09-29 05:32:52 +08:00
|
|
|
muteAllUsers: Service.muteAllUsers,
|
|
|
|
muteAllExceptPresenter: Service.muteAllExceptPresenter,
|
2017-09-29 02:19:57 +08:00
|
|
|
changeRole: Service.changeRole,
|
2017-12-06 03:13:11 +08:00
|
|
|
roving: Service.roving,
|
2018-03-21 03:35:28 +08:00
|
|
|
CustomLogoUrl: Service.getCustomLogoUrl(),
|
2018-06-05 03:11:11 +08:00
|
|
|
compact,
|
2018-07-26 22:56:26 +08:00
|
|
|
getGroupChatPrivate: Service.getGroupChatPrivate,
|
2018-07-10 01:08:19 +08:00
|
|
|
handleEmojiChange: Service.setEmojiStatus,
|
2018-07-12 04:08:22 +08:00
|
|
|
getEmojiList: Service.getEmojiList(),
|
|
|
|
getEmoji: Service.getEmoji(),
|
2018-09-14 02:09:30 +08:00
|
|
|
showBranding: getFromUserSettings('displayBrandingArea', Meteor.settings.public.app.branding.displayBrandingArea),
|
2019-01-15 00:58:01 +08:00
|
|
|
hasPrivateChatBetweenUsers: Service.hasPrivateChatBetweenUsers,
|
2019-01-29 23:17:09 +08:00
|
|
|
toggleUserLock: Service.toggleUserLock,
|
2018-01-08 12:44:42 +08:00
|
|
|
}))(UserListContainer);
|