Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ContactListView.js 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. var 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. /* jshint ignore:start */
  30. ReactDOM.render(
  31. <Provider store = { APP.store }>
  32. <I18nextProvider i18n = { i18next }>
  33. <ContactListPanel />
  34. </I18nextProvider>
  35. </Provider>,
  36. contactListPanelContainer
  37. );
  38. /* jshint ignore:end */
  39. },
  40. /**
  41. * Indicates if the contact list is currently visible.
  42. *
  43. * @return {boolean) true if the contact list is currently visible.
  44. */
  45. isVisible () {
  46. return UIUtil.isVisible(document.getElementById("contactlist"));
  47. }
  48. };
  49. export default ContactListView;