Pārlūkot izejas kodu

fix(av-moderation) Fix text on stop video dialog

Show correct text on stop participant's video dialog when moderation is on
master
robertpin 3 gadus atpakaļ
vecāks
revīzija
21d5b7bcd6

+ 2
- 2
lang/main.json Parādīt failu

268
         "muteEveryoneStartMuted": "Everyone starts muted from now on",
268
         "muteEveryoneStartMuted": "Everyone starts muted from now on",
269
         "muteParticipantBody": "You won't be able to unmute them, but they can unmute themselves at any time.",
269
         "muteParticipantBody": "You won't be able to unmute them, but they can unmute themselves at any time.",
270
         "muteParticipantButton": "Mute",
270
         "muteParticipantButton": "Mute",
271
-        "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.",
272
         "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.",
271
         "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.",
273
-        "muteParticipantTitle": "Mute this participant?",
272
+        "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.",
274
         "muteParticipantsVideoButton": "Stop video",
273
         "muteParticipantsVideoButton": "Stop video",
275
         "muteParticipantsVideoTitle": "Disable camera of this participant?",
274
         "muteParticipantsVideoTitle": "Disable camera of this participant?",
276
         "muteParticipantsVideoBody": "You won't be able to turn the camera back on, but they can turn it back on at any time.",
275
         "muteParticipantsVideoBody": "You won't be able to turn the camera back on, but they can turn it back on at any time.",
276
+        "muteParticipantsVideoBodyModerationOn": "You won't be able to turn the camera back on and neither will they.",
277
         "noDropboxToken": "No valid Dropbox token",
277
         "noDropboxToken": "No valid Dropbox token",
278
         "Ok": "OK",
278
         "Ok": "OK",
279
         "password": "Password",
279
         "password": "Password",

+ 20
- 0
react/features/video-menu/components/AbstractMuteRemoteParticipantsVideoDialog.js Parādīt failu

3
 import { Component } from 'react';
3
 import { Component } from 'react';
4
 
4
 
5
 import { rejectParticipantVideo } from '../../av-moderation/actions';
5
 import { rejectParticipantVideo } from '../../av-moderation/actions';
6
+import { isEnabledFromState } from '../../av-moderation/functions';
6
 import { MEDIA_TYPE } from '../../base/media';
7
 import { MEDIA_TYPE } from '../../base/media';
7
 import { muteRemote } from '../actions';
8
 import { muteRemote } from '../actions';
8
 
9
 
17
      */
18
      */
18
     dispatch: Function,
19
     dispatch: Function,
19
 
20
 
21
+    /**
22
+     * Whether or not video moderation is on.
23
+     */
24
+    isVideoModerationOn: boolean,
25
+
20
     /**
26
     /**
21
      * The ID of the remote participant to be muted.
27
      * The ID of the remote participant to be muted.
22
      */
28
      */
65
         return true;
71
         return true;
66
     }
72
     }
67
 }
73
 }
74
+
75
+/**
76
+ * Maps (parts of) the redux state to the associated
77
+ * {@code AbstractDialogContainer}'s props.
78
+ *
79
+ * @param {Object} state - The redux state.
80
+ * @private
81
+ * @returns {Object}
82
+ */
83
+export function abstractMapStateToProps(state: Object) {
84
+    return {
85
+        isVideoModerationOn: isEnabledFromState(MEDIA_TYPE.VIDEO, state)
86
+    };
87
+}

+ 8
- 4
react/features/video-menu/components/native/MuteRemoteParticipantsVideoDialog.js Parādīt failu

5
 import { ConfirmDialog } from '../../../base/dialog';
5
 import { ConfirmDialog } from '../../../base/dialog';
6
 import { translate } from '../../../base/i18n';
6
 import { translate } from '../../../base/i18n';
7
 import { connect } from '../../../base/redux';
7
 import { connect } from '../../../base/redux';
8
-import AbstractMuteRemoteParticipantsVideoDialog
9
-    from '../AbstractMuteRemoteParticipantsVideoDialog';
8
+import AbstractMuteRemoteParticipantsVideoDialog, {
9
+    abstractMapStateToProps
10
+} from '../AbstractMuteRemoteParticipantsVideoDialog';
10
 
11
 
11
 /**
12
 /**
12
  * Dialog to confirm a remote participant's video stop action.
13
  * Dialog to confirm a remote participant's video stop action.
21
     render() {
22
     render() {
22
         return (
23
         return (
23
             <ConfirmDialog
24
             <ConfirmDialog
24
-                contentKey = 'dialog.muteParticipantsVideoDialog'
25
+                contentKey = { this.props.isVideoModerationOn
26
+                    ? 'dialog.muteParticipantsVideoDialogModerationOn'
27
+                    : 'dialog.muteParticipantsVideoDialog'
28
+                }
25
                 onSubmit = { this._onSubmit } />
29
                 onSubmit = { this._onSubmit } />
26
         );
30
         );
27
     }
31
     }
29
     _onSubmit: () => boolean;
33
     _onSubmit: () => boolean;
30
 }
34
 }
31
 
35
 
32
-export default translate(connect()(MuteRemoteParticipantsVideoDialog));
36
+export default translate(connect(abstractMapStateToProps)(MuteRemoteParticipantsVideoDialog));

+ 8
- 4
react/features/video-menu/components/web/MuteRemoteParticipantsVideoDialog.js Parādīt failu

5
 import { Dialog } from '../../../base/dialog';
5
 import { Dialog } from '../../../base/dialog';
6
 import { translate } from '../../../base/i18n';
6
 import { translate } from '../../../base/i18n';
7
 import { connect } from '../../../base/redux';
7
 import { connect } from '../../../base/redux';
8
-import AbstractMuteRemoteParticipantsVideoDialog
9
-    from '../AbstractMuteRemoteParticipantsVideoDialog';
8
+import AbstractMuteRemoteParticipantsVideoDialog, {
9
+    abstractMapStateToProps
10
+} from '../AbstractMuteRemoteParticipantsVideoDialog';
10
 
11
 
11
 /**
12
 /**
12
  * A React Component with the contents for a dialog that asks for confirmation
13
  * A React Component with the contents for a dialog that asks for confirmation
29
                 titleKey = 'dialog.muteParticipantsVideoTitle'
30
                 titleKey = 'dialog.muteParticipantsVideoTitle'
30
                 width = 'small'>
31
                 width = 'small'>
31
                 <div>
32
                 <div>
32
-                    { this.props.t('dialog.muteParticipantsVideoBody') }
33
+                    {this.props.t(this.props.isVideoModerationOn
34
+                        ? 'dialog.muteParticipantsVideoBodyModerationOn'
35
+                        : 'dialog.muteParticipantsVideoBody'
36
+                    ) }
33
                 </div>
37
                 </div>
34
             </Dialog>
38
             </Dialog>
35
         );
39
         );
38
     _onSubmit: () => boolean;
42
     _onSubmit: () => boolean;
39
 }
43
 }
40
 
44
 
41
-export default translate(connect()(MuteRemoteParticipantsVideoDialog));
45
+export default translate(connect(abstractMapStateToProps)(MuteRemoteParticipantsVideoDialog));

Notiek ielāde…
Atcelt
Saglabāt