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.

SidePanels.js 832B

12345678910111213141516171819202122232425262728293031
  1. import Chat from './chat/Chat';
  2. import SettingsMenu from './settings/SettingsMenu';
  3. import Profile from './profile/Profile';
  4. import ContactListView from './contactlist/ContactListView';
  5. import UIUtil from '../util/UIUtil';
  6. const SidePanels = {
  7. init (eventEmitter) {
  8. // Initialize chat
  9. if (UIUtil.isButtonEnabled('chat')) {
  10. Chat.init(eventEmitter);
  11. }
  12. // Initialize settings
  13. if (UIUtil.isButtonEnabled('settings')) {
  14. SettingsMenu.init(eventEmitter);
  15. }
  16. // Initialize profile
  17. if (UIUtil.isButtonEnabled('profile')) {
  18. Profile.init(eventEmitter);
  19. }
  20. // Initialize contact list view
  21. if (UIUtil.isButtonEnabled('contacts')) {
  22. ContactListView.init();
  23. }
  24. }
  25. };
  26. export default SidePanels;