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

72 lines
1.8 KiB
React
Raw Normal View History

import React, { PureComponent } from 'react';
2017-08-24 00:29:21 +08:00
import { injectIntl } from 'react-intl';
import PropTypes from 'prop-types';
import injectWbResizeEvent from '/imports/ui/components/presentation/resize-wrapper/component';
import { styles } from './styles.scss';
2018-03-21 03:35:28 +08:00
import CustomLogo from './custom-logo/component';
2018-10-24 22:17:13 +08:00
import UserContentContainer from './user-list-content/container';
2016-05-20 02:22:56 +08:00
2016-06-29 03:52:03 +08:00
const propTypes = {
2017-07-28 21:43:39 +08:00
compact: PropTypes.bool,
intl: PropTypes.shape({
formatMessage: PropTypes.func.isRequired,
}).isRequired,
CustomLogoUrl: PropTypes.string.isRequired,
isPublicChat: PropTypes.func.isRequired,
setEmojiStatus: PropTypes.func.isRequired,
clearAllEmojiStatus: PropTypes.func.isRequired,
2017-12-07 00:53:16 +08:00
roving: PropTypes.func.isRequired,
showBranding: PropTypes.bool.isRequired,
requestUserInformation: PropTypes.func.isRequired,
2016-06-29 03:52:03 +08:00
};
2016-06-29 03:52:03 +08:00
const defaultProps = {
2017-07-28 21:43:39 +08:00
compact: false,
2016-06-29 03:52:03 +08:00
};
class UserList extends PureComponent {
2017-07-28 21:43:39 +08:00
render() {
2018-03-21 03:35:28 +08:00
const {
intl,
compact,
setEmojiStatus,
clearAllEmojiStatus,
2018-03-21 03:35:28 +08:00
isPublicChat,
roving,
CustomLogoUrl,
showBranding,
2018-10-02 21:48:12 +08:00
hasBreakoutRoom,
requestUserInformation,
2018-03-21 03:35:28 +08:00
} = this.props;
2017-07-28 21:43:39 +08:00
return (
<div className={styles.userList}>
2018-03-21 03:35:28 +08:00
{
showBranding
2019-01-14 21:23:35 +08:00
&& !compact
&& CustomLogoUrl
? <CustomLogo CustomLogoUrl={CustomLogoUrl} /> : null
2018-03-21 03:35:28 +08:00
}
2018-10-24 22:17:13 +08:00
{<UserContentContainer
2018-03-21 03:35:28 +08:00
{...{
2019-01-14 21:23:35 +08:00
intl,
compact,
setEmojiStatus,
clearAllEmojiStatus,
2019-01-14 21:23:35 +08:00
isPublicChat,
roving,
hasBreakoutRoom,
requestUserInformation,
2019-01-14 21:23:35 +08:00
}
}
/>}
2017-07-28 21:43:39 +08:00
</div>
);
}
2016-05-20 02:22:56 +08:00
}
2016-06-29 03:52:03 +08:00
UserList.propTypes = propTypes;
2017-07-28 21:43:39 +08:00
UserList.defaultProps = defaultProps;
export default injectWbResizeEvent(injectIntl(UserList));