2017-08-30 23:17:55 +00:00
|
|
|
/* global $, APP */
|
2016-11-11 15:00:54 +00:00
|
|
|
|
2017-08-30 23:17:55 +00:00
|
|
|
/* eslint-disable no-unused-vars */
|
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import { I18nextProvider } from 'react-i18next';
|
|
|
|
import { Provider } from 'react-redux';
|
2017-04-13 00:23:43 +00:00
|
|
|
|
2017-08-30 23:17:55 +00:00
|
|
|
import { i18next } from '../../../../react/features/base/i18n';
|
|
|
|
import { ContactListPanel } from '../../../../react/features/contact-list';
|
|
|
|
/* eslint-enable no-unused-vars */
|
2016-10-12 00:08:24 +00:00
|
|
|
|
2017-08-30 23:17:55 +00:00
|
|
|
import UIUtil from '../../util/UIUtil';
|
2016-10-12 00:08:24 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Contact list.
|
2017-08-30 23:17:55 +00:00
|
|
|
*
|
|
|
|
* FIXME: One day this view should no longer be called "contact list" because
|
|
|
|
* the term "contact" is not used elsewhere. Normally people in the conference
|
|
|
|
* are internally refered to as "participants" or externally as "members".
|
2016-10-12 00:08:24 +00:00
|
|
|
*/
|
|
|
|
var ContactListView = {
|
2016-10-25 13:16:15 +00:00
|
|
|
/**
|
2017-08-30 23:17:55 +00:00
|
|
|
* Creates and appends the contact list to the side panel.
|
2016-10-25 13:16:15 +00:00
|
|
|
*
|
2017-08-30 23:17:55 +00:00
|
|
|
* @returns {void}
|
2016-10-25 13:16:15 +00:00
|
|
|
*/
|
2017-08-30 23:17:55 +00:00
|
|
|
init() {
|
|
|
|
const contactListPanelContainer = document.createElement('div');
|
2016-10-12 00:08:24 +00:00
|
|
|
|
2017-08-30 23:17:55 +00:00
|
|
|
contactListPanelContainer.id = 'contacts_container';
|
|
|
|
contactListPanelContainer.className = 'sideToolbarContainer__inner';
|
2016-10-21 17:11:22 +00:00
|
|
|
|
2017-08-30 23:17:55 +00:00
|
|
|
$('#sideToolbarContainer').append(contactListPanelContainer);
|
2017-04-13 00:23:43 +00:00
|
|
|
|
2017-08-30 23:17:55 +00:00
|
|
|
/* jshint ignore:start */
|
|
|
|
ReactDOM.render(
|
|
|
|
<Provider store = { APP.store }>
|
|
|
|
<I18nextProvider i18n = { i18next }>
|
|
|
|
<ContactListPanel />
|
|
|
|
</I18nextProvider>
|
|
|
|
</Provider>,
|
|
|
|
contactListPanelContainer
|
|
|
|
);
|
|
|
|
/* jshint ignore:end */
|
2016-10-12 00:08:24 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2017-08-30 23:17:55 +00:00
|
|
|
* Indicates if the contact list is currently visible.
|
2017-04-13 00:23:43 +00:00
|
|
|
*
|
2017-08-30 23:17:55 +00:00
|
|
|
* @return {boolean) true if the contact list is currently visible.
|
2016-10-12 00:08:24 +00:00
|
|
|
*/
|
|
|
|
isVisible () {
|
|
|
|
return UIUtil.isVisible(document.getElementById("contactlist"));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-04-18 21:49:52 +00:00
|
|
|
export default ContactListView;
|