From 678f3e232b909397a05416f7ab8d2fe1321986bd Mon Sep 17 00:00:00 2001 From: Vlad Piersec Date: Mon, 22 Mar 2021 11:49:25 +0200 Subject: [PATCH] fix(toolbar): Re-add "mute everyone's video" button --- lang/main.json | 1 + .../base/icons/svg/mute-video-everyone.svg | 4 +- .../components/MuteEveryonesVideoButton.js | 1 - .../toolbox/components/native/OverflowMenu.js | 2 + .../toolbox/components/web/Toolbox.js | 5 ++ .../native/MuteEveryonesVideoDialog.js | 67 +++++++++++++++++++ .../video-menu/components/native/index.js | 1 + 7 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 react/features/video-menu/components/native/MuteEveryonesVideoDialog.js diff --git a/lang/main.json b/lang/main.json index bbdcf7a40..4b8f9ae12 100644 --- a/lang/main.json +++ b/lang/main.json @@ -244,6 +244,7 @@ "muteEveryoneElsesVideoDialog": "Once the camera is disabled, you won't be able to turn it back on, but they can turn it back on at any time.", "muteEveryoneElsesVideoTitle": "Disable everyone's camera except {{whom}}?", "muteEveryonesVideoDialog": "Are you sure you want to disable everyone's camera? You won't be able to turn it back on, but they can turn it back on at any time.", + "muteEveryonesVideoDialogOk": "Disable", "muteEveryonesVideoTitle": "Disable everyone's camera?", "muteEveryoneSelf": "yourself", "muteEveryoneStartMuted": "Everyone starts muted from now on", diff --git a/react/features/base/icons/svg/mute-video-everyone.svg b/react/features/base/icons/svg/mute-video-everyone.svg index 5e9c24076..243183dad 100644 --- a/react/features/base/icons/svg/mute-video-everyone.svg +++ b/react/features/base/icons/svg/mute-video-everyone.svg @@ -3,10 +3,10 @@ - - diff --git a/react/features/toolbox/components/MuteEveryonesVideoButton.js b/react/features/toolbox/components/MuteEveryonesVideoButton.js index e02e23eff..b682f534c 100644 --- a/react/features/toolbox/components/MuteEveryonesVideoButton.js +++ b/react/features/toolbox/components/MuteEveryonesVideoButton.js @@ -35,7 +35,6 @@ class MuteEveryonesVideoButton extends AbstractButton { accessibilityLabel = 'toolbar.accessibilityLabel.muteEveryonesVideo'; icon = IconMuteVideoEveryone; label = 'toolbar.muteEveryonesVideo'; - tooltip = 'toolbar.muteVideoEveryone'; /** * Handles clicking / pressing the button, and opens a confirmation dialog. diff --git a/react/features/toolbox/components/native/OverflowMenu.js b/react/features/toolbox/components/native/OverflowMenu.js index 35ca30342..9dd1a4134 100644 --- a/react/features/toolbox/components/native/OverflowMenu.js +++ b/react/features/toolbox/components/native/OverflowMenu.js @@ -21,6 +21,7 @@ import { TileViewButton } from '../../../video-layout'; import { getMovableButtons } from '../../functions.native'; import HelpButton from '../HelpButton'; import MuteEveryoneButton from '../MuteEveryoneButton'; +import MuteEveryonesVideoButton from '../MuteEveryonesVideoButton'; import AudioOnlyButton from './AudioOnlyButton'; import MoreOptionsButton from './MoreOptionsButton'; @@ -152,6 +153,7 @@ class OverflowMenu extends PureComponent { + diff --git a/react/features/toolbox/components/web/Toolbox.js b/react/features/toolbox/components/web/Toolbox.js index 14669693f..8d1080dcf 100644 --- a/react/features/toolbox/components/web/Toolbox.js +++ b/react/features/toolbox/components/web/Toolbox.js @@ -80,6 +80,7 @@ import DownloadButton from '../DownloadButton'; import HangupButton from '../HangupButton'; import HelpButton from '../HelpButton'; import MuteEveryoneButton from '../MuteEveryoneButton'; +import MuteEveryonesVideoButton from '../MuteEveryonesVideoButton'; import AudioSettingsButton from './AudioSettingsButton'; import OverflowMenuButton from './OverflowMenuButton'; @@ -1008,6 +1009,10 @@ class Toolbox extends Component { && , + this._shouldShowButton('mute-video-everyone') + && , this._shouldShowButton('livestreaming') && { + + /** + * Implements {@code Component#render}. + * + * @inheritdoc + */ + render() { + return ( + + + { `${this.props.title} \n\n ${this.props.content}` } + + + ); + } + + _onSubmit: () => boolean; +} + +/** + * Maps part of the Redux state to the props of this component. + * + * @param {Object} state - The Redux state. + * @param {Props} ownProps - The own props of the component. + * @returns {{ + * _dialogStyles: StyleType + * }} + */ +function _mapStateToProps(state: Object, ownProps: Props) { + return { + ...abstractMapStateToProps(state, ownProps), + _dialogStyles: ColorSchemeRegistry.get(state, 'Dialog') + }; +} + +export default translate(connect(_mapStateToProps)(MuteEveryonesVideoDialog)); diff --git a/react/features/video-menu/components/native/index.js b/react/features/video-menu/components/native/index.js index ea4d12220..a00f563a1 100644 --- a/react/features/video-menu/components/native/index.js +++ b/react/features/video-menu/components/native/index.js @@ -3,5 +3,6 @@ export { default as GrantModeratorDialog } from './GrantModeratorDialog'; export { default as KickRemoteParticipantDialog } from './KickRemoteParticipantDialog'; export { default as MuteEveryoneDialog } from './MuteEveryoneDialog'; +export { default as MuteEveryonesVideoDialog } from './MuteEveryonesVideoDialog'; export { default as MuteRemoteParticipantDialog } from './MuteRemoteParticipantDialog'; export { default as RemoteVideoMenu } from './RemoteVideoMenu';