2016-10-25 13:16:15 +00:00
|
|
|
import Chat from './chat/Chat';
|
|
|
|
import SettingsMenu from './settings/SettingsMenu';
|
|
|
|
import Profile from './profile/Profile';
|
|
|
|
import ContactListView from './contactlist/ContactListView';
|
2016-11-02 21:14:36 +00:00
|
|
|
import UIUtil from '../util/UIUtil';
|
2016-10-25 13:16:15 +00:00
|
|
|
|
|
|
|
const SidePanels = {
|
|
|
|
init (eventEmitter) {
|
2017-03-31 17:54:58 +00:00
|
|
|
// Initialize chat
|
|
|
|
if (UIUtil.isButtonEnabled('chat')) {
|
2016-11-02 21:14:36 +00:00
|
|
|
Chat.init(eventEmitter);
|
2017-03-31 17:54:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Initialize settings
|
|
|
|
if (UIUtil.isButtonEnabled('settings')) {
|
2016-11-02 21:14:36 +00:00
|
|
|
SettingsMenu.init(eventEmitter);
|
2017-03-31 17:54:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Initialize profile
|
|
|
|
if (UIUtil.isButtonEnabled('profile')) {
|
2016-11-02 21:14:36 +00:00
|
|
|
Profile.init(eventEmitter);
|
2017-03-31 17:54:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Initialize contact list view
|
|
|
|
if (UIUtil.isButtonEnabled('contacts')) {
|
2016-11-02 21:14:36 +00:00
|
|
|
ContactListView.init();
|
2017-03-31 17:54:58 +00:00
|
|
|
}
|
2016-10-25 13:16:15 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2017-03-31 17:54:58 +00:00
|
|
|
export default SidePanels;
|