diff --git a/bigbluebutton-html5/.meteor/packages b/bigbluebutton-html5/.meteor/packages index 66027107eeef83d267304a3bff0bb92dd17f6ca6..a0f2677c4c0edd35479d857cb77bcf15a282cd30 100644 --- a/bigbluebutton-html5/.meteor/packages +++ b/bigbluebutton-html5/.meteor/packages @@ -23,3 +23,4 @@ shell-server@0.3.0 http@1.3.0 dynamic-import@0.2.0 rocketchat:streamer +session diff --git a/bigbluebutton-html5/client/main.jsx b/bigbluebutton-html5/client/main.jsx index ae41f44093cbd6ddd1b3cf381ea6391c84b37b3c..835460c9943526f84e39444f54ba737a9e5fe2d3 100755 --- a/bigbluebutton-html5/client/main.jsx +++ b/bigbluebutton-html5/client/main.jsx @@ -6,6 +6,7 @@ import logger from '/imports/startup/client/logger'; import LoadingScreen from '/imports/ui/components/loading-screen/component'; import { joinRouteHandler, authenticatedRouteHandler } from '/imports/startup/client/auth'; import Base from '/imports/startup/client/base'; +import { Session } from 'meteor/session'; Meteor.startup(() => { render(<LoadingScreen />, document.getElementById('app')); @@ -23,6 +24,8 @@ Meteor.startup(() => { // TODO make this a Promise joinRouteHandler((value, error) => { authenticatedRouteHandler((valueInner, errorInner) => { + // set defaults + Session.set('isUserListOpen', false); render(<Base />, document.getElementById('app')); }); }); diff --git a/bigbluebutton-html5/imports/ui/components/app/component.jsx b/bigbluebutton-html5/imports/ui/components/app/component.jsx index d6f9c0dee698f404d256db9317a323ca6b4201f4..4e41df116febe0fcdb0b0e3b33e326f122ca0b6c 100755 --- a/bigbluebutton-html5/imports/ui/components/app/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/app/component.jsx @@ -12,6 +12,7 @@ import NotificationsBarContainer from '../notifications-bar/container'; import AudioContainer from '../audio/container'; import ChatAlertContainer from '../chat/alert/container'; import { styles } from './styles'; +import UserListContainer from '../user-list/container'; const MOBILE_MEDIA = 'only screen and (max-width: 40em)'; const USERLIST_COMPACT_WIDTH = 50; @@ -42,7 +43,7 @@ const propTypes = { media: PropTypes.element, actionsbar: PropTypes.element, closedCaption: PropTypes.element, - userList: PropTypes.element, + userListIsOpen: PropTypes.bool.isRequired, chat: PropTypes.element, locale: PropTypes.string, intl: intlShape.isRequired, @@ -55,7 +56,6 @@ const defaultProps = { media: null, actionsbar: null, closedCaption: null, - userList: null, chat: null, locale: 'en', }; @@ -143,31 +143,33 @@ class App extends Component { } renderUserList() { - const { intl, chatIsOpen } = this.props; - let { userList } = this.props; + const { + intl, chatIsOpen, userListIsOpen, + } = this.props; + const { compactUserList } = this.state; - if (!userList) return null; + if (!userListIsOpen) return null; const userListStyle = {}; userListStyle[styles.compact] = compactUserList; - userList = React.cloneElement(userList, { - compact: compactUserList, - }); + // userList = React.cloneElement(userList, { + // compact: compactUserList, // TODO 4767 + // }); return ( <div className={cx(styles.userList, userListStyle)} aria-label={intl.formatMessage(intlMessages.userListLabel)} - aria-hidden={chatIsOpen} + aria-hidden={chatIsOpen /* TODO 4767 -- Why is this not `userListIsOpen` */} > - {userList} + <UserListContainer /> </div> ); } renderUserListResizable() { - const { userList } = this.props; + const { userListIsOpen } = this.props; // Variables for resizing user-list. const USERLIST_MIN_WIDTH_PX = 100; @@ -177,7 +179,7 @@ class App extends Component { // decide whether using pixel or percentage unit as a default width for userList const USERLIST_DEFAULT_WIDTH = (window.innerWidth * (USERLIST_DEFAULT_WIDTH_RELATIVE / 100.0)) < USERLIST_MAX_WIDTH_PX ? `${USERLIST_DEFAULT_WIDTH_RELATIVE}%` : USERLIST_MAX_WIDTH_PX; - if (!userList) return null; + if (!userListIsOpen) return null; const resizableEnableOptions = { top: false, @@ -262,7 +264,7 @@ class App extends Component { renderMedia() { const { - media, intl, chatIsOpen, userlistIsOpen, + media, intl, chatIsOpen, userListIsOpen, } = this.props; if (!media) return null; @@ -271,7 +273,7 @@ class App extends Component { <section className={styles.media} aria-label={intl.formatMessage(intlMessages.mediaLabel)} - aria-hidden={userlistIsOpen || chatIsOpen} + aria-hidden={userListIsOpen || chatIsOpen} > {media} {this.renderClosedCaption()} @@ -281,7 +283,7 @@ class App extends Component { renderActionsBar() { const { - actionsbar, intl, userlistIsOpen, chatIsOpen, + actionsbar, intl, userListIsOpen, chatIsOpen, } = this.props; if (!actionsbar) return null; @@ -290,7 +292,7 @@ class App extends Component { <section className={styles.actionsbar} aria-label={intl.formatMessage(intlMessages.actionsBarLabel)} - aria-hidden={userlistIsOpen || chatIsOpen} + aria-hidden={userListIsOpen || chatIsOpen} > {actionsbar} </section> @@ -298,7 +300,7 @@ class App extends Component { } render() { - const { params, userlistIsOpen } = this.props; + const { params, userListIsOpen } = this.props; const { enableResize } = this.state; return ( @@ -311,14 +313,14 @@ class App extends Component { {this.renderActionsBar()} </div> {enableResize ? this.renderUserListResizable() : this.renderUserList()} - {userlistIsOpen && enableResize ? <div className={styles.userlistPad} /> : null} + {userListIsOpen && enableResize ? <div className={styles.userlistPad} /> : null} {enableResize ? this.renderChatResizable() : this.renderChat()} {this.renderSidebar()} </section> <ModalContainer /> <AudioContainer /> <ToastContainer /> - {/*<ChatAlertContainer currentChatID={params.chatID} /> TODO 4767*/} + {/* <ChatAlertContainer currentChatID={params.chatID} /> TODO 4767 */} </main> ); } diff --git a/bigbluebutton-html5/imports/ui/components/app/container.jsx b/bigbluebutton-html5/imports/ui/components/app/container.jsx index fbc8d8a1efdd3696b76dd7ede9b7aa3109c1fbe4..371b85673414399d2a36940d8f495f0618c50937 100755 --- a/bigbluebutton-html5/imports/ui/components/app/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/app/container.jsx @@ -54,7 +54,7 @@ const AppContainer = (props) => { // const navbarWithLocation = cloneElement(navbar, { location: props.location }); // TODO 4767 const navbarWithLocation = navbar; // TODO 4767 - console.log('_001') + console.log('_001'); return ( <App navbar={navbarWithLocation} @@ -108,8 +108,8 @@ export default injectIntl(withModalMounter(withTracker(({ intl, baseControls }) return { closedCaption: getCaptionsStatus() ? <ClosedCaptionsContainer /> : null, fontSize: getFontSize(), - userlistIsOpen: window.location.pathname.includes('users'), - chatIsOpen: window.location.pathname.includes('chat'), + userListIsOpen: Boolean(Session.get('isUserListOpen')), + // chatIsOpen: window.location.pathname.includes('chat'), // TODO 4767 }; })(AppContainer))); diff --git a/bigbluebutton-html5/imports/ui/components/logout-confirmation/component.jsx b/bigbluebutton-html5/imports/ui/components/logout-confirmation/component.jsx index 04d122d052360ba6e9c3124338a588e8f2548702..bae5ddb7eb2f7eb973ac23a7a69ae85516e88225 100755 --- a/bigbluebutton-html5/imports/ui/components/logout-confirmation/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/logout-confirmation/component.jsx @@ -79,7 +79,7 @@ const LeaveConfirmation = ({ className={styles.endMeeting} label={intl.formatMessage(intlMessages.endMeetingLabel)} onClick={handleEndMeeting} - aria-describedby={'modalEndMeetingDesc'} + aria-describedby="modalEndMeetingDesc" /> : null } <div id="modalEndMeetingDesc" hidden>{intl.formatMessage(intlMessages.endMeetingDesc)}</div> diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/container.jsx b/bigbluebutton-html5/imports/ui/components/nav-bar/container.jsx index 67177bbdddfc5d9d19179bf3663042bbd58c8182..3e67f94ca5616436201b39522c5a718261d5253a 100755 --- a/bigbluebutton-html5/imports/ui/components/nav-bar/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/nav-bar/container.jsx @@ -1,6 +1,7 @@ import React from 'react'; import { Meteor } from 'meteor/meteor'; import { withTracker } from 'meteor/react-meteor-data'; +import { Session } from 'meteor/session'; import Meetings from '/imports/api/meetings'; import Auth from '/imports/ui/services/auth'; import { meetingIsBreakout } from '/imports/ui/components/app/service'; @@ -19,7 +20,7 @@ const NavBarContainer = ({ children, ...props }) => ( </NavBar> ); -export default withTracker(({ location }) => { +export default withTracker(() => { const CLIENT_TITLE = getFromUserSettings('clientTitle', PUBLIC_CONFIG.app.clientTitle); let meetingTitle; @@ -53,8 +54,7 @@ export default withTracker(({ location }) => { const breakouts = Service.getBreakouts(); const currentUserId = Auth.userID; - // const isExpanded = location.pathname.indexOf('/users') !== -1; // TODO 4767 - const isExpanded = true; // TODO 4767 + const isExpanded = Boolean(Session.get('isUserListOpen')); return { isExpanded, @@ -66,11 +66,7 @@ export default withTracker(({ location }) => { isBreakoutRoom: meetingIsBreakout(), beingRecorded: meetingRecorded, toggleUserList: () => { - // if (location.pathname.indexOf('/users') !== -1) { - // router.push('/'); // TODO 4767 - // } else { - // router.push('/users'); // TODO 4767 - // } + Session.set('isUserListOpen', !isExpanded); }, }; })(NavBarContainer); diff --git a/bigbluebutton-html5/imports/ui/components/user-list/chat-list-item/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/chat-list-item/component.jsx index 5af9e051d1745350b4bade4ddb362fd74255844d..491d3126ad7291e8d2b87a4d2db8b9f08d524517 100644 --- a/bigbluebutton-html5/imports/ui/components/user-list/chat-list-item/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/chat-list-item/component.jsx @@ -60,46 +60,47 @@ const ChatListItem = (props) => { } = props; let linkPath = [PRIVATE_CHAT_PATH, chat.id].join(''); - linkPath = location.pathname.includes(linkPath) ? CLOSED_CHAT_PATH : linkPath; + // linkPath = location.pathname.includes(linkPath) ? CLOSED_CHAT_PATH : linkPath; // TODO 4767 const isCurrentChat = chat.id === openChat; const linkClasses = {}; linkClasses[styles.active] = isCurrentChat; - return ( - {/*<Link*/} - {/*data-test="publicChatLink"*/} - {/*to={linkPath}*/} - {/*className={cx(styles.chatListItem, linkClasses)}*/} - {/*role="button"*/} - {/*aria-expanded={isCurrentChat}*/} - {/*tabIndex={tabIndex}*/} - {/*accessKey={isPublicChat(chat) ? TOGGLE_CHAT_PUB_AK : null}*/} - {/*>*/} - {/*<div className={styles.chatListItemLink}>*/} - {/*<div className={styles.chatIcon}>*/} - {/*{chat.icon ?*/} - {/*<ChatIcon icon={chat.icon} />*/} - {/*:*/} - {/*<ChatAvatar*/} - {/*isModerator={chat.isModerator}*/} - {/*color={chat.color}*/} - {/*name={chat.name.toLowerCase().slice(0, 2)}*/} - {/*/>}*/} - {/*</div>*/} - {/*<div className={styles.chatName}>*/} - {/*{!compact ?*/} - {/*<span className={styles.chatNameMain}>*/} - {/*{isPublicChat(chat) ? intl.formatMessage(intlMessages.titlePublic) : chat.name}*/} - {/*</span> : null}*/} - {/*</div>*/} - {/*{(chat.unreadCounter > 0) ?*/} - {/*<ChatUnreadCounter*/} - {/*counter={chat.unreadCounter}*/} - {/*/>*/} - {/*: null}*/} - {/*</div>*/} - {/*</Link>*/} // TODO 4767 - ); + return null; + // return ( + // <Link + // data-test="publicChatLink" + // to={linkPath} + // className={cx(styles.chatListItem, linkClasses)} + // role="button" + // aria-expanded={isCurrentChat} + // tabIndex={tabIndex} + // accessKey={isPublicChat(chat) ? TOGGLE_CHAT_PUB_AK : null} + // > + // <div className={styles.chatListItemLink}> + // <div className={styles.chatIcon}> + // {chat.icon ? + // <ChatIcon icon={chat.icon} /> + // : + // <ChatAvatar + // isModerator={chat.isModerator} + // color={chat.color} + // name={chat.name.toLowerCase().slice(0, 2)} + // />} + // </div> + // <div className={styles.chatName}> + // {!compact ? + // <span className={styles.chatNameMain}> + // {isPublicChat(chat) ? intl.formatMessage(intlMessages.titlePublic) : chat.name} + // </span> : null} + // </div> + // {(chat.unreadCounter > 0) ? + // <ChatUnreadCounter + // counter={chat.unreadCounter} + // /> + // : null} + // </div> + // </Link> + // ); // TODO 4767 }; ChatListItem.propTypes = propTypes; diff --git a/bigbluebutton-html5/imports/ui/components/user-list/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/component.jsx index 4045096c1e967f6cf284f0a51f88c6e20a880a90..27b9e6e69283e1255eb5ceb645c0e70b9e286b9b 100755 --- a/bigbluebutton-html5/imports/ui/components/user-list/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/component.jsx @@ -39,7 +39,6 @@ const defaultProps = { }; class UserList extends Component { - render() { const { intl,