mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-16 23:27:47 +00:00
- implement breakout-rooms - integrated into the participants panel - managed by moderators - moderators can send participants to breakout-rooms - participants can join breakout rooms by themselve - participants can leave breakout rooms anytime Co-authored-by: Robert Pintilii <robert.pin9@gmail.com> Co-authored-by: Saúl Ibarra Corretgé <saghul@jitsi.org>
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
// @flow
|
|
|
|
import { makeStyles } from '@material-ui/styles';
|
|
import React, { useCallback } from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { useDispatch } from 'react-redux';
|
|
|
|
import ParticipantPaneBaseButton from '../../../participants-pane/components/web/ParticipantPaneBaseButton';
|
|
import { autoAssignToBreakoutRooms } from '../../actions';
|
|
|
|
const useStyles = makeStyles(theme => {
|
|
return {
|
|
button: {
|
|
color: theme.palette.link01,
|
|
width: '100%',
|
|
backgroundColor: 'transparent',
|
|
|
|
'&:hover': {
|
|
backgroundColor: 'transparent'
|
|
}
|
|
}
|
|
};
|
|
});
|
|
|
|
export const AutoAssignButton = () => {
|
|
const { t } = useTranslation();
|
|
const dispatch = useDispatch();
|
|
const styles = useStyles();
|
|
|
|
const onAutoAssign = useCallback(() => {
|
|
dispatch(autoAssignToBreakoutRooms());
|
|
}, [ dispatch ]);
|
|
|
|
return (
|
|
<ParticipantPaneBaseButton
|
|
accessibilityLabel = { t('breakoutRooms.actions.autoAssign') }
|
|
className = { styles.button }
|
|
onClick = { onAutoAssign }>
|
|
{t('breakoutRooms.actions.autoAssign')}
|
|
</ParticipantPaneBaseButton>
|
|
);
|
|
};
|