fix(av-moderation) Fix text on stop video dialog
Show correct text on stop participant's video dialog when moderation is on
This commit is contained in:
commit
c2e55339d1
|
@ -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",
|
||||
|
|
|
@ -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<P:Props = Props,
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps (parts of) the redux state to the associated
|
||||
* {@code AbstractDialogContainer}'s props.
|
||||
*
|
||||
* @param {Object} state - The redux state.
|
||||
* @private
|
||||
* @returns {Object}
|
||||
*/
|
||||
export function abstractMapStateToProps(state: Object) {
|
||||
return {
|
||||
isVideoModerationOn: isEnabledFromState(MEDIA_TYPE.VIDEO, state)
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,8 +5,9 @@ import React from 'react';
|
|||
import { ConfirmDialog } from '../../../base/dialog';
|
||||
import { translate } from '../../../base/i18n';
|
||||
import { connect } from '../../../base/redux';
|
||||
import AbstractMuteRemoteParticipantsVideoDialog
|
||||
from '../AbstractMuteRemoteParticipantsVideoDialog';
|
||||
import AbstractMuteRemoteParticipantsVideoDialog, {
|
||||
abstractMapStateToProps
|
||||
} from '../AbstractMuteRemoteParticipantsVideoDialog';
|
||||
|
||||
/**
|
||||
* Dialog to confirm a remote participant's video stop action.
|
||||
|
@ -21,7 +22,10 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVi
|
|||
render() {
|
||||
return (
|
||||
<ConfirmDialog
|
||||
contentKey = 'dialog.muteParticipantsVideoDialog'
|
||||
contentKey = { this.props.isVideoModerationOn
|
||||
? 'dialog.muteParticipantsVideoDialogModerationOn'
|
||||
: 'dialog.muteParticipantsVideoDialog'
|
||||
}
|
||||
onSubmit = { this._onSubmit } />
|
||||
);
|
||||
}
|
||||
|
@ -29,4 +33,4 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVi
|
|||
_onSubmit: () => boolean;
|
||||
}
|
||||
|
||||
export default translate(connect()(MuteRemoteParticipantsVideoDialog));
|
||||
export default translate(connect(abstractMapStateToProps)(MuteRemoteParticipantsVideoDialog));
|
||||
|
|
|
@ -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'>
|
||||
<div>
|
||||
{ this.props.t('dialog.muteParticipantsVideoBody') }
|
||||
{this.props.t(this.props.isVideoModerationOn
|
||||
? 'dialog.muteParticipantsVideoBodyModerationOn'
|
||||
: 'dialog.muteParticipantsVideoBody'
|
||||
) }
|
||||
</div>
|
||||
</Dialog>
|
||||
);
|
||||
|
@ -38,4 +42,4 @@ class MuteRemoteParticipantsVideoDialog extends AbstractMuteRemoteParticipantsVi
|
|||
_onSubmit: () => boolean;
|
||||
}
|
||||
|
||||
export default translate(connect()(MuteRemoteParticipantsVideoDialog));
|
||||
export default translate(connect(abstractMapStateToProps)(MuteRemoteParticipantsVideoDialog));
|
||||
|
|
Loading…
Reference in New Issue