From 21d5b7bcd6a3735d4d5dd2d3ef524168b79d51d2 Mon Sep 17 00:00:00 2001 From: robertpin Date: Wed, 3 Nov 2021 12:38:12 +0200 Subject: [PATCH] fix(av-moderation) Fix text on stop video dialog Show correct text on stop participant's video dialog when moderation is on --- lang/main.json | 4 ++-- ...stractMuteRemoteParticipantsVideoDialog.js | 20 +++++++++++++++++++ .../MuteRemoteParticipantsVideoDialog.js | 12 +++++++---- .../web/MuteRemoteParticipantsVideoDialog.js | 12 +++++++---- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/lang/main.json b/lang/main.json index 56443f5f54..ec7026da31 100644 --- a/lang/main.json +++ b/lang/main.json @@ -268,12 +268,12 @@ "muteEveryoneStartMuted": "Everyone starts muted from now on", "muteParticipantBody": "You won't be able to unmute them, but they can unmute themselves at any time.", "muteParticipantButton": "Mute", - "muteParticipantDialog": "Are you sure you want to mute this participant? You won't be able to unmute them, but they can unmute themselves at any time.", "muteParticipantsVideoDialog": "Are you sure you want to turn off this participant's camera? You won't be able to turn the camera back on, but they can turn it back on at any time.", - "muteParticipantTitle": "Mute this participant?", + "muteParticipantsVideoDialogModerationOn": "Are you sure you want to turn off this participant's camera? You won't be able to turn the camera back on and neither will they.", "muteParticipantsVideoButton": "Stop video", "muteParticipantsVideoTitle": "Disable camera of this participant?", "muteParticipantsVideoBody": "You won't be able to turn the camera back on, but they can turn it back on at any time.", + "muteParticipantsVideoBodyModerationOn": "You won't be able to turn the camera back on and neither will they.", "noDropboxToken": "No valid Dropbox token", "Ok": "OK", "password": "Password", diff --git a/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.js b/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.js index 40b6189fcd..f26b07f350 100644 --- a/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.js +++ b/react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.js @@ -3,6 +3,7 @@ import { Component } from 'react'; import { rejectParticipantVideo } from '../../av-moderation/actions'; +import { isEnabledFromState } from '../../av-moderation/functions'; import { MEDIA_TYPE } from '../../base/media'; import { muteRemote } from '../actions'; @@ -17,6 +18,11 @@ export type Props = { */ dispatch: Function, + /** + * Whether or not video moderation is on. + */ + isVideoModerationOn: boolean, + /** * The ID of the remote participant to be muted. */ @@ -65,3 +71,17 @@ export default class AbstractMuteRemoteParticipantsVideoDialog ); } @@ -29,4 +33,4 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVi _onSubmit: () => boolean; } -export default translate(connect()(MuteRemoteParticipantsVideoDialog)); +export default translate(connect(abstractMapStateToProps)(MuteRemoteParticipantsVideoDialog)); diff --git a/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.js b/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.js index 292e456552..764ffb5ac1 100644 --- a/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.js +++ b/react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.js @@ -5,8 +5,9 @@ import React from 'react'; import { Dialog } from '../../../base/dialog'; import { translate } from '../../../base/i18n'; import { connect } from '../../../base/redux'; -import AbstractMuteRemoteParticipantsVideoDialog - from '../AbstractMuteRemoteParticipantsVideoDialog'; +import AbstractMuteRemoteParticipantsVideoDialog, { + abstractMapStateToProps +} from '../AbstractMuteRemoteParticipantsVideoDialog'; /** * A React Component with the contents for a dialog that asks for confirmation @@ -29,7 +30,10 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVi titleKey = 'dialog.muteParticipantsVideoTitle' width = 'small'>
- { this.props.t('dialog.muteParticipantsVideoBody') } + {this.props.t(this.props.isVideoModerationOn + ? 'dialog.muteParticipantsVideoBodyModerationOn' + : 'dialog.muteParticipantsVideoBody' + ) }
); @@ -38,4 +42,4 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVi _onSubmit: () => boolean; } -export default translate(connect()(MuteRemoteParticipantsVideoDialog)); +export default translate(connect(abstractMapStateToProps)(MuteRemoteParticipantsVideoDialog));