You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ContactListView.js 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* global $, APP */
  2. /* eslint-disable no-unused-vars */
  3. import React from 'react';
  4. import ReactDOM from 'react-dom';
  5. import { I18nextProvider } from 'react-i18next';
  6. import { Provider } from 'react-redux';
  7. import { i18next } from '../../../../react/features/base/i18n';
  8. import { ContactListPanel } from '../../../../react/features/contact-list';
  9. /* eslint-enable no-unused-vars */
  10. import UIUtil from '../../util/UIUtil';
  11. /**
  12. * Contact list.
  13. *
  14. * FIXME: One day this view should no longer be called "contact list" because
  15. * the term "contact" is not used elsewhere. Normally people in the conference
  16. * are internally refered to as "participants" or externally as "members".
  17. */
  18. const ContactListView = {
  19. /**
  20. * Creates and appends the contact list to the side panel.
  21. *
  22. * @returns {void}
  23. */
  24. init() {
  25. const contactListPanelContainer = document.createElement('div');
  26. contactListPanelContainer.id = 'contacts_container';
  27. contactListPanelContainer.className = 'sideToolbarContainer__inner';
  28. $('#sideToolbarContainer').append(contactListPanelContainer);
  29. ReactDOM.render(
  30. <Provider store = { APP.store }>
  31. <I18nextProvider i18n = { i18next }>
  32. <ContactListPanel />
  33. </I18nextProvider>
  34. </Provider>,
  35. contactListPanelContainer
  36. );
  37. },
  38. /**
  39. * Indicates if the contact list is currently visible.
  40. *
  41. * @return {boolean) true if the contact list is currently visible.
  42. */
  43. isVisible() {
  44. return UIUtil.isVisible(document.getElementById('contactlist'));
  45. }
  46. };
  47. export default ContactListView;