您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ParticipantsPane.js 2.6KB

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