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.

ParticipantsPane.js 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // @flow
  2. import React, { useCallback } from 'react';
  3. import { useTranslation } from 'react-i18next';
  4. import { ScrollView, View } from 'react-native';
  5. import { Button } from 'react-native-paper';
  6. import { useDispatch } from 'react-redux';
  7. import { hideDialog } from '../../../base/dialog';
  8. import { Icon, IconClose, IconHorizontalPoints } from '../../../base/icons';
  9. import { JitsiModal } from '../../../base/modal';
  10. import { LobbyParticipantList } from './LobbyParticipantList';
  11. import { MeetingParticipantList } from './MeetingParticipantList';
  12. import styles from './styles';
  13. /**
  14. * Participant pane.
  15. *
  16. * @returns {React$Element<any>}
  17. */
  18. export function ParticipantsPane() {
  19. const dispatch = useDispatch();
  20. const closePane = useCallback(
  21. () => dispatch(hideDialog()),
  22. [ dispatch ]);
  23. const { t } = useTranslation();
  24. return (
  25. <JitsiModal
  26. showHeaderWithNavigation = { false }
  27. style = { styles.participantsPane }>
  28. <View style = { styles.header }>
  29. <Button
  30. contentStyle = { styles.closeIcon }
  31. /* eslint-disable-next-line react/jsx-no-bind */
  32. icon = { () =>
  33. (<Icon
  34. size = { 24 }
  35. src = { IconClose } />)
  36. }
  37. mode = 'contained'
  38. onPress = { closePane }
  39. style = { styles.closeButton } />
  40. </View>
  41. <ScrollView>
  42. <LobbyParticipantList />
  43. <MeetingParticipantList />
  44. </ScrollView>
  45. <View style = { styles.footer }>
  46. <Button
  47. children = { t('participantsPane.actions.muteAll') }
  48. labelStyle = { styles.muteAllLabel }
  49. style = { styles.muteAllButton } />
  50. <Button
  51. contentStyle = { styles.moreIcon }
  52. /* eslint-disable-next-line react/jsx-no-bind */
  53. icon = { () =>
  54. (<Icon
  55. size = { 24 }
  56. src = { IconHorizontalPoints } />)
  57. }
  58. mode = 'contained'
  59. style = { styles.moreButton } />
  60. </View>
  61. </JitsiModal>
  62. );
  63. }
  64. export default ParticipantsPane;