2023-07-03 12:58:58 +03:00
|
|
|
import React, { useCallback, useEffect, useRef } from 'react';
|
2024-05-22 13:01:17 -05:00
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
import { useDispatch, useSelector } from 'react-redux';
|
2023-07-03 12:58:58 +03:00
|
|
|
import { makeStyles } from 'tss-react/mui';
|
2017-02-16 17:02:40 -06:00
|
|
|
|
2024-05-22 13:01:17 -05:00
|
|
|
import { IReduxState } from '../../../app/types';
|
2023-06-29 14:59:12 +03:00
|
|
|
import { isMobileBrowser } from '../../../base/environment/utils';
|
2024-05-22 13:36:53 -05:00
|
|
|
import { getLocalParticipant, isLocalParticipantModerator } from '../../../base/participants/functions';
|
2022-10-06 13:09:40 +03:00
|
|
|
import ContextMenu from '../../../base/ui/components/web/ContextMenu';
|
2024-02-01 12:54:40 -06:00
|
|
|
import { isReactionsButtonEnabled, shouldDisplayReactionsButtons } from '../../../reactions/functions.web';
|
2025-02-28 09:52:09 -06:00
|
|
|
import { isCCTabEnabled } from '../../../subtitles/functions.any';
|
2024-10-02 17:43:00 -05:00
|
|
|
import { isTranscribing } from '../../../transcribing/functions';
|
2018-04-20 13:24:14 +02:00
|
|
|
import {
|
2022-08-26 20:25:04 +02:00
|
|
|
setHangupMenuVisible,
|
2018-04-20 13:24:14 +02:00
|
|
|
setOverflowMenuVisible,
|
2021-01-15 13:43:09 +02:00
|
|
|
setToolbarHovered,
|
2024-10-09 17:31:16 +02:00
|
|
|
setToolboxVisible
|
2023-04-07 13:22:34 +03:00
|
|
|
} from '../../actions.web';
|
|
|
|
|
import {
|
|
|
|
|
getJwtDisabledButtons,
|
2024-05-22 13:01:17 -05:00
|
|
|
getVisibleButtons,
|
2025-12-17 12:17:06 +02:00
|
|
|
getVisibleButtonsForReducedUI,
|
2024-02-29 17:39:13 -06:00
|
|
|
isButtonEnabled,
|
2023-04-07 13:22:34 +03:00
|
|
|
isToolboxVisible
|
|
|
|
|
} from '../../functions.web';
|
2024-05-23 09:20:51 -05:00
|
|
|
import { useKeyboardShortcuts, useToolboxButtons } from '../../hooks.web';
|
2024-05-22 13:01:17 -05:00
|
|
|
import { IToolboxButton } from '../../types';
|
2018-05-10 18:01:55 -05:00
|
|
|
import HangupButton from '../HangupButton';
|
2020-05-20 12:57:03 +02:00
|
|
|
|
2022-08-26 20:25:04 +02:00
|
|
|
import { EndConferenceButton } from './EndConferenceButton';
|
|
|
|
|
import HangupMenuButton from './HangupMenuButton';
|
|
|
|
|
import { LeaveConferenceButton } from './LeaveConferenceButton';
|
2018-04-09 07:03:26 +02:00
|
|
|
import OverflowMenuButton from './OverflowMenuButton';
|
2021-07-08 16:42:07 +03:00
|
|
|
import Separator from './Separator';
|
2018-04-09 07:03:26 +02:00
|
|
|
|
2018-05-10 21:10:26 -05:00
|
|
|
/**
|
|
|
|
|
* The type of the React {@code Component} props of {@link Toolbox}.
|
|
|
|
|
*/
|
2024-05-22 13:01:17 -05:00
|
|
|
interface IProps {
|
2018-04-09 07:03:26 +02:00
|
|
|
|
2025-11-11 18:32:28 +05:30
|
|
|
/**
|
|
|
|
|
* Optional toolbar background color passed as a prop.
|
|
|
|
|
*/
|
|
|
|
|
toolbarBackgroundColor?: string;
|
|
|
|
|
|
2021-08-20 11:53:11 +03:00
|
|
|
/**
|
|
|
|
|
* Explicitly passed array with the buttons which this Toolbox should display.
|
|
|
|
|
*/
|
2024-05-22 13:01:17 -05:00
|
|
|
toolbarButtons?: Array<string>;
|
2022-08-25 14:35:19 +03:00
|
|
|
}
|
2021-09-02 14:42:39 +03:00
|
|
|
|
2023-07-03 12:58:58 +03:00
|
|
|
const useStyles = makeStyles()(() => {
|
2021-11-15 10:37:54 +02:00
|
|
|
return {
|
2022-08-26 20:25:04 +02:00
|
|
|
hangupMenu: {
|
2023-07-03 12:58:58 +03:00
|
|
|
position: 'relative',
|
2022-08-26 20:25:04 +02:00
|
|
|
right: 'auto',
|
|
|
|
|
display: 'flex',
|
2023-07-03 12:58:58 +03:00
|
|
|
flexDirection: 'column',
|
2022-08-26 20:25:04 +02:00
|
|
|
rowGap: '8px',
|
|
|
|
|
margin: 0,
|
2022-10-25 16:11:55 +03:00
|
|
|
padding: '16px',
|
2024-12-03 13:51:38 +02:00
|
|
|
marginBottom: '8px'
|
2021-11-15 10:37:54 +02:00
|
|
|
}
|
|
|
|
|
};
|
2023-07-03 12:58:58 +03:00
|
|
|
});
|
|
|
|
|
|
2024-05-22 13:01:17 -05:00
|
|
|
/**
|
|
|
|
|
* A component that renders the main toolbar.
|
|
|
|
|
*
|
|
|
|
|
* @param {IProps} props - The props of the component.
|
|
|
|
|
* @returns {ReactElement}
|
|
|
|
|
*/
|
|
|
|
|
export default function Toolbox({
|
2025-11-11 18:32:28 +05:30
|
|
|
toolbarButtons,
|
|
|
|
|
toolbarBackgroundColor: toolbarBackgroundColorProp
|
2024-05-22 13:01:17 -05:00
|
|
|
}: IProps) {
|
2023-07-03 12:58:58 +03:00
|
|
|
const { classes, cx } = useStyles();
|
2024-05-22 13:01:17 -05:00
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const dispatch = useDispatch();
|
2023-07-03 12:58:58 +03:00
|
|
|
const _toolboxRef = useRef<HTMLDivElement>(null);
|
|
|
|
|
|
2024-05-22 13:01:17 -05:00
|
|
|
const conference = useSelector((state: IReduxState) => state['features/base/conference'].conference);
|
|
|
|
|
const isNarrowLayout = useSelector((state: IReduxState) => state['features/base/responsive-ui'].isNarrowLayout);
|
2025-05-05 17:48:40 -05:00
|
|
|
const videoSpaceWidth = useSelector((state: IReduxState) => state['features/base/responsive-ui'].videoSpaceWidth);
|
2024-05-22 13:01:17 -05:00
|
|
|
const isModerator = useSelector(isLocalParticipantModerator);
|
2025-12-17 12:17:06 +02:00
|
|
|
const customToolbarButtons = useSelector((state: IReduxState) => state['features/base/config'].customToolbarButtons);
|
2024-05-22 13:01:17 -05:00
|
|
|
const iAmRecorder = useSelector((state: IReduxState) => state['features/base/config'].iAmRecorder);
|
|
|
|
|
const iAmSipGateway = useSelector((state: IReduxState) => state['features/base/config'].iAmSipGateway);
|
|
|
|
|
const overflowDrawer = useSelector((state: IReduxState) => state['features/toolbox'].overflowDrawer);
|
|
|
|
|
const shiftUp = useSelector((state: IReduxState) => state['features/toolbox'].shiftUp);
|
|
|
|
|
const overflowMenuVisible = useSelector((state: IReduxState) => state['features/toolbox'].overflowMenuVisible);
|
|
|
|
|
const hangupMenuVisible = useSelector((state: IReduxState) => state['features/toolbox'].hangupMenuVisible);
|
|
|
|
|
const buttonsWithNotifyClick
|
|
|
|
|
= useSelector((state: IReduxState) => state['features/toolbox'].buttonsWithNotifyClick);
|
|
|
|
|
const reduxToolbarButtons = useSelector((state: IReduxState) => state['features/toolbox'].toolbarButtons);
|
|
|
|
|
const toolbarButtonsToUse = toolbarButtons || reduxToolbarButtons;
|
|
|
|
|
const isDialogVisible = useSelector((state: IReduxState) => Boolean(state['features/base/dialog'].component));
|
2024-05-22 13:36:53 -05:00
|
|
|
const localParticipant = useSelector(getLocalParticipant);
|
2024-10-02 17:43:00 -05:00
|
|
|
const transcribing = useSelector(isTranscribing);
|
2025-02-28 09:52:09 -06:00
|
|
|
const _isCCTabEnabled = useSelector(isCCTabEnabled);
|
2025-11-11 18:32:28 +05:30
|
|
|
// Read toolbar background color from config (if provided) or from props.
|
|
|
|
|
const toolbarBackgroundColorFromConfig = useSelector((state: IReduxState) =>
|
|
|
|
|
state['features/base/config'].toolbarConfig?.backgroundColor);
|
|
|
|
|
const toolbarBackgroundColor = toolbarBackgroundColorProp || toolbarBackgroundColorFromConfig;
|
2024-10-02 17:43:00 -05:00
|
|
|
// Do not convert to selector, it returns new array and will cause re-rendering of toolbox on every action.
|
2025-02-28 09:52:09 -06:00
|
|
|
const jwtDisabledButtons = getJwtDisabledButtons(transcribing, _isCCTabEnabled, localParticipant?.features);
|
2024-10-02 17:43:00 -05:00
|
|
|
|
2024-05-22 13:01:17 -05:00
|
|
|
const reactionsButtonEnabled = useSelector(isReactionsButtonEnabled);
|
|
|
|
|
const _shouldDisplayReactionsButtons = useSelector(shouldDisplayReactionsButtons);
|
|
|
|
|
const toolbarVisible = useSelector(isToolboxVisible);
|
|
|
|
|
const mainToolbarButtonsThresholds
|
|
|
|
|
= useSelector((state: IReduxState) => state['features/toolbox'].mainToolbarButtonsThresholds);
|
2025-12-17 12:17:06 +02:00
|
|
|
const { reducedUImainToolbarButtons } = useSelector((state: IReduxState) => state['features/base/config']);
|
|
|
|
|
const reducedUI = useSelector((state: IReduxState) => state['features/base/responsive-ui'].reducedUI);
|
2024-05-23 09:20:51 -05:00
|
|
|
const allButtons = useToolboxButtons(customToolbarButtons);
|
2024-12-03 13:51:38 +02:00
|
|
|
const isMobile = isMobileBrowser();
|
|
|
|
|
const endConferenceSupported = Boolean(conference?.isEndConferenceSupported() && isModerator);
|
2024-05-22 13:01:17 -05:00
|
|
|
|
|
|
|
|
useKeyboardShortcuts(toolbarButtonsToUse);
|
2023-07-03 12:58:58 +03:00
|
|
|
|
|
|
|
|
useEffect(() => {
|
2024-05-22 13:01:17 -05:00
|
|
|
if (!toolbarVisible) {
|
2023-04-24 14:07:42 +03:00
|
|
|
if (document.activeElement instanceof HTMLElement
|
2023-07-03 12:58:58 +03:00
|
|
|
&& _toolboxRef.current?.contains(document.activeElement)) {
|
2023-04-24 14:07:42 +03:00
|
|
|
document.activeElement.blur();
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-05-22 13:01:17 -05:00
|
|
|
}, [ toolbarVisible ]);
|
2018-04-09 07:03:26 +02:00
|
|
|
|
|
|
|
|
/**
|
2023-07-03 12:58:58 +03:00
|
|
|
* Sets the visibility of the hangup menu.
|
2018-04-09 07:03:26 +02:00
|
|
|
*
|
2023-07-03 12:58:58 +03:00
|
|
|
* @param {boolean} visible - Whether or not the hangup menu should be
|
|
|
|
|
* displayed.
|
|
|
|
|
* @private
|
2018-04-09 07:03:26 +02:00
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
2023-07-03 12:58:58 +03:00
|
|
|
const onSetHangupVisible = useCallback((visible: boolean) => {
|
|
|
|
|
dispatch(setHangupMenuVisible(visible));
|
|
|
|
|
dispatch(setToolbarHovered(visible));
|
2024-05-22 13:01:17 -05:00
|
|
|
}, [ dispatch ]);
|
2017-02-16 17:02:40 -06:00
|
|
|
|
|
|
|
|
/**
|
2023-07-03 12:58:58 +03:00
|
|
|
* Sets the visibility of the overflow menu.
|
2017-02-16 17:02:40 -06:00
|
|
|
*
|
2023-07-03 12:58:58 +03:00
|
|
|
* @param {boolean} visible - Whether or not the overflow menu should be
|
|
|
|
|
* displayed.
|
|
|
|
|
* @private
|
|
|
|
|
* @returns {void}
|
2017-02-16 17:02:40 -06:00
|
|
|
*/
|
2023-07-03 12:58:58 +03:00
|
|
|
const onSetOverflowVisible = useCallback((visible: boolean) => {
|
|
|
|
|
dispatch(setOverflowMenuVisible(visible));
|
|
|
|
|
dispatch(setToolbarHovered(visible));
|
2024-05-22 13:01:17 -05:00
|
|
|
}, [ dispatch ]);
|
2022-02-04 11:06:07 +01:00
|
|
|
|
2023-07-03 12:58:58 +03:00
|
|
|
useEffect(() => {
|
2024-12-03 13:51:38 +02:00
|
|
|
|
|
|
|
|
// On mobile web we want to keep both toolbox and hang up menu visible
|
|
|
|
|
// because they depend on each other.
|
|
|
|
|
if (endConferenceSupported && isMobile) {
|
|
|
|
|
hangupMenuVisible && dispatch(setToolboxVisible(true));
|
|
|
|
|
} else if (hangupMenuVisible && !toolbarVisible) {
|
2023-07-03 12:58:58 +03:00
|
|
|
onSetHangupVisible(false);
|
|
|
|
|
dispatch(setToolbarHovered(false));
|
|
|
|
|
}
|
2024-05-22 13:01:17 -05:00
|
|
|
}, [ dispatch, hangupMenuVisible, toolbarVisible, onSetHangupVisible ]);
|
2018-04-09 07:03:26 +02:00
|
|
|
|
2023-07-03 12:58:58 +03:00
|
|
|
useEffect(() => {
|
2024-05-22 13:01:17 -05:00
|
|
|
if (overflowMenuVisible && isDialogVisible) {
|
2023-07-03 12:58:58 +03:00
|
|
|
onSetOverflowVisible(false);
|
|
|
|
|
dispatch(setToolbarHovered(false));
|
|
|
|
|
}
|
2024-05-22 13:01:17 -05:00
|
|
|
}, [ dispatch, overflowMenuVisible, isDialogVisible, onSetOverflowVisible ]);
|
2017-02-16 17:02:40 -06:00
|
|
|
|
2021-06-10 14:48:44 +02:00
|
|
|
/**
|
2022-08-26 20:25:04 +02:00
|
|
|
* Key handler for overflow/hangup menus.
|
2021-06-10 14:48:44 +02:00
|
|
|
*
|
|
|
|
|
* @param {KeyboardEvent} e - Esc key click to close the popup.
|
|
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
2023-07-03 12:58:58 +03:00
|
|
|
const onEscKey = useCallback((e?: React.KeyboardEvent) => {
|
2022-09-06 20:32:20 +03:00
|
|
|
if (e?.key === 'Escape') {
|
|
|
|
|
e?.stopPropagation();
|
2024-05-22 13:01:17 -05:00
|
|
|
hangupMenuVisible && dispatch(setHangupMenuVisible(false));
|
|
|
|
|
overflowMenuVisible && dispatch(setOverflowMenuVisible(false));
|
2021-07-08 16:42:07 +03:00
|
|
|
}
|
2024-05-22 13:01:17 -05:00
|
|
|
}, [ dispatch, hangupMenuVisible, overflowMenuVisible ]);
|
2021-07-08 16:42:07 +03:00
|
|
|
|
2018-04-09 07:03:26 +02:00
|
|
|
/**
|
|
|
|
|
* Dispatches an action signaling the toolbar is not being hovered.
|
|
|
|
|
*
|
|
|
|
|
* @private
|
|
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
2024-05-22 13:01:17 -05:00
|
|
|
const onMouseOut = useCallback(() => {
|
|
|
|
|
!overflowMenuVisible && dispatch(setToolbarHovered(false));
|
|
|
|
|
}, [ dispatch, overflowMenuVisible ]);
|
2017-02-16 17:02:40 -06:00
|
|
|
|
|
|
|
|
/**
|
2018-04-09 07:03:26 +02:00
|
|
|
* Dispatches an action signaling the toolbar is being hovered.
|
2017-02-16 17:02:40 -06:00
|
|
|
*
|
|
|
|
|
* @private
|
2018-04-09 07:03:26 +02:00
|
|
|
* @returns {void}
|
2017-02-16 17:02:40 -06:00
|
|
|
*/
|
2024-05-22 13:01:17 -05:00
|
|
|
const onMouseOver = useCallback(() => {
|
2023-07-03 12:58:58 +03:00
|
|
|
dispatch(setToolbarHovered(true));
|
2024-05-22 13:01:17 -05:00
|
|
|
}, [ dispatch ]);
|
2021-01-15 13:43:09 +02:00
|
|
|
|
|
|
|
|
/**
|
2024-10-09 17:31:16 +02:00
|
|
|
* Handle focus on the toolbar.
|
2021-01-15 13:43:09 +02:00
|
|
|
*
|
|
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
2024-10-09 17:31:16 +02:00
|
|
|
const handleFocus = useCallback(() => {
|
|
|
|
|
dispatch(setToolboxVisible(true));
|
|
|
|
|
}, [ dispatch ]);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Handle blur the toolbar..
|
|
|
|
|
*
|
|
|
|
|
* @returns {void}
|
|
|
|
|
*/
|
|
|
|
|
const handleBlur = useCallback(() => {
|
|
|
|
|
dispatch(setToolboxVisible(false));
|
|
|
|
|
}, [ dispatch ]);
|
2018-04-09 07:03:26 +02:00
|
|
|
|
2024-05-22 13:01:17 -05:00
|
|
|
if (iAmRecorder || iAmSipGateway) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-12 14:19:04 +02:00
|
|
|
|
2024-05-22 13:01:17 -05:00
|
|
|
const rootClassNames = `new-toolbox ${toolbarVisible ? 'visible' : ''} ${
|
2025-05-05 16:47:38 -05:00
|
|
|
toolbarButtonsToUse.length ? '' : 'no-buttons'}`;
|
2024-05-22 13:01:17 -05:00
|
|
|
|
|
|
|
|
const toolbarAccLabel = 'toolbar.accessibilityLabel.moreActionsMenu';
|
|
|
|
|
const containerClassName = `toolbox-content${isMobile || isNarrowLayout ? ' toolbox-content-mobile' : ''}`;
|
|
|
|
|
|
2025-12-17 12:17:06 +02:00
|
|
|
const normalUIButtons = getVisibleButtons({
|
2024-05-23 09:20:51 -05:00
|
|
|
allButtons,
|
2024-05-22 13:01:17 -05:00
|
|
|
buttonsWithNotifyClick,
|
|
|
|
|
toolbarButtons: toolbarButtonsToUse,
|
2025-05-05 17:48:40 -05:00
|
|
|
clientWidth: videoSpaceWidth,
|
2024-05-22 13:01:17 -05:00
|
|
|
jwtDisabledButtons,
|
|
|
|
|
mainToolbarButtonsThresholds
|
|
|
|
|
});
|
2025-12-17 12:17:06 +02:00
|
|
|
|
|
|
|
|
const reducedUIButtons = getVisibleButtonsForReducedUI({
|
|
|
|
|
allButtons,
|
|
|
|
|
buttonsWithNotifyClick,
|
|
|
|
|
jwtDisabledButtons,
|
|
|
|
|
reducedUImainToolbarButtons,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const mainMenuButtons = reducedUI
|
|
|
|
|
? reducedUIButtons.mainMenuButtons
|
|
|
|
|
: normalUIButtons.mainMenuButtons;
|
|
|
|
|
const overflowMenuButtons = reducedUI
|
|
|
|
|
? []
|
|
|
|
|
: normalUIButtons.overflowMenuButtons;
|
2024-05-22 13:01:17 -05:00
|
|
|
const raiseHandInOverflowMenu = overflowMenuButtons.some(({ key }) => key === 'raisehand');
|
|
|
|
|
const showReactionsInOverflowMenu = _shouldDisplayReactionsButtons
|
2024-05-23 09:20:51 -05:00
|
|
|
&& (
|
|
|
|
|
(!reactionsButtonEnabled && (raiseHandInOverflowMenu || isNarrowLayout || isMobile))
|
|
|
|
|
|| overflowMenuButtons.some(({ key }) => key === 'reactions'));
|
2024-05-22 13:01:17 -05:00
|
|
|
const showRaiseHandInReactionsMenu = showReactionsInOverflowMenu && raiseHandInOverflowMenu;
|
2019-03-05 14:26:45 +00:00
|
|
|
|
2024-05-22 13:01:17 -05:00
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
className = { cx(rootClassNames, shiftUp && 'shift-up') }
|
2025-11-11 18:32:28 +05:30
|
|
|
id = 'new-toolbox'
|
|
|
|
|
style = { toolbarBackgroundColor ? { backgroundColor: toolbarBackgroundColor } : undefined }>
|
2021-03-12 14:19:04 +02:00
|
|
|
<div className = { containerClassName }>
|
2021-04-19 14:18:28 +03:00
|
|
|
<div
|
|
|
|
|
className = 'toolbox-content-wrapper'
|
2024-10-09 17:31:16 +02:00
|
|
|
onBlur = { handleBlur }
|
|
|
|
|
onFocus = { handleFocus }
|
2024-05-22 13:01:17 -05:00
|
|
|
{ ...(isMobile ? {} : {
|
2023-07-03 12:58:58 +03:00
|
|
|
onMouseOut,
|
|
|
|
|
onMouseOver
|
2021-07-30 11:37:45 +03:00
|
|
|
}) }>
|
2021-09-02 14:42:39 +03:00
|
|
|
|
2023-04-24 14:07:42 +03:00
|
|
|
<div
|
|
|
|
|
className = 'toolbox-content-items'
|
2023-07-03 12:58:58 +03:00
|
|
|
ref = { _toolboxRef }>
|
2021-07-08 16:42:07 +03:00
|
|
|
{mainMenuButtons.map(({ Content, key, ...rest }) => Content !== Separator && (
|
|
|
|
|
<Content
|
|
|
|
|
{ ...rest }
|
2022-01-04 13:21:00 +02:00
|
|
|
buttonKey = { key }
|
2021-07-08 16:42:07 +03:00
|
|
|
key = { key } />))}
|
|
|
|
|
|
|
|
|
|
{Boolean(overflowMenuButtons.length) && (
|
|
|
|
|
<OverflowMenuButton
|
|
|
|
|
ariaControls = 'overflow-menu'
|
2023-06-29 14:59:12 +03:00
|
|
|
buttons = { overflowMenuButtons.reduce<Array<IToolboxButton[]>>((acc, val) => {
|
2023-04-27 19:19:53 -05:00
|
|
|
if (val.key === 'reactions' && showReactionsInOverflowMenu) {
|
|
|
|
|
return acc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (val.key === 'raisehand' && showRaiseHandInReactionsMenu) {
|
|
|
|
|
return acc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (acc.length) {
|
|
|
|
|
const prev = acc[acc.length - 1];
|
|
|
|
|
const group = prev[prev.length - 1].group;
|
|
|
|
|
|
|
|
|
|
if (group === val.group) {
|
|
|
|
|
prev.push(val);
|
2022-04-05 15:19:03 +03:00
|
|
|
} else {
|
|
|
|
|
acc.push([ val ]);
|
|
|
|
|
}
|
2023-04-27 19:19:53 -05:00
|
|
|
} else {
|
|
|
|
|
acc.push([ val ]);
|
|
|
|
|
}
|
2022-04-05 15:19:03 +03:00
|
|
|
|
2023-04-27 19:19:53 -05:00
|
|
|
return acc;
|
|
|
|
|
}, []) }
|
2024-05-22 13:01:17 -05:00
|
|
|
isOpen = { overflowMenuVisible }
|
2023-04-27 19:19:53 -05:00
|
|
|
key = 'overflow-menu'
|
2023-07-03 12:58:58 +03:00
|
|
|
onToolboxEscKey = { onEscKey }
|
|
|
|
|
onVisibilityChange = { onSetOverflowVisible }
|
2023-04-27 19:19:53 -05:00
|
|
|
showRaiseHandInReactionsMenu = { showRaiseHandInReactionsMenu }
|
|
|
|
|
showReactionsMenu = { showReactionsInOverflowMenu } />
|
2021-07-08 16:42:07 +03:00
|
|
|
)}
|
|
|
|
|
|
2024-05-22 13:01:17 -05:00
|
|
|
{isButtonEnabled('hangup', toolbarButtonsToUse) && (
|
|
|
|
|
endConferenceSupported
|
2022-08-26 20:25:04 +02:00
|
|
|
? <HangupMenuButton
|
|
|
|
|
ariaControls = 'hangup-menu'
|
2024-05-22 13:01:17 -05:00
|
|
|
isOpen = { hangupMenuVisible }
|
2022-08-26 20:25:04 +02:00
|
|
|
key = 'hangup-menu'
|
2024-05-22 13:01:17 -05:00
|
|
|
notifyMode = { buttonsWithNotifyClick?.get('hangup-menu') }
|
2023-07-03 12:58:58 +03:00
|
|
|
onVisibilityChange = { onSetHangupVisible }>
|
2022-08-26 20:25:04 +02:00
|
|
|
<ContextMenu
|
|
|
|
|
accessibilityLabel = { t(toolbarAccLabel) }
|
|
|
|
|
className = { classes.hangupMenu }
|
|
|
|
|
hidden = { false }
|
2024-05-22 13:01:17 -05:00
|
|
|
inDrawer = { overflowDrawer }
|
2023-07-03 12:58:58 +03:00
|
|
|
onKeyDown = { onEscKey }>
|
2022-09-14 17:42:30 +01:00
|
|
|
<EndConferenceButton
|
|
|
|
|
buttonKey = 'end-meeting'
|
2024-05-22 13:01:17 -05:00
|
|
|
notifyMode = { buttonsWithNotifyClick?.get('end-meeting') } />
|
2022-09-14 17:42:30 +01:00
|
|
|
<LeaveConferenceButton
|
|
|
|
|
buttonKey = 'hangup'
|
2024-05-22 13:01:17 -05:00
|
|
|
notifyMode = { buttonsWithNotifyClick?.get('hangup') } />
|
2022-08-26 20:25:04 +02:00
|
|
|
</ContextMenu>
|
|
|
|
|
</HangupMenuButton>
|
|
|
|
|
: <HangupButton
|
|
|
|
|
buttonKey = 'hangup'
|
|
|
|
|
customClass = 'hangup-button'
|
|
|
|
|
key = 'hangup-button'
|
2024-05-22 13:01:17 -05:00
|
|
|
notifyMode = { buttonsWithNotifyClick.get('hangup') }
|
|
|
|
|
visible = { isButtonEnabled('hangup', toolbarButtonsToUse) } />
|
2022-08-26 20:25:04 +02:00
|
|
|
)}
|
2021-03-18 14:09:22 +02:00
|
|
|
</div>
|
2019-02-20 23:35:19 +00:00
|
|
|
</div>
|
2021-02-23 13:09:22 +02:00
|
|
|
</div>
|
2023-07-03 12:58:58 +03:00
|
|
|
</div>
|
|
|
|
|
);
|
2017-02-16 17:02:40 -06:00
|
|
|
}
|