Преглед на файлове

fix(toolbar): Re-add "mute everyone's video" button

master
Vlad Piersec преди 4 години
родител
ревизия
678f3e232b

+ 1
- 0
lang/main.json Целия файл

244
         "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.",
244
         "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.",
245
         "muteEveryoneElsesVideoTitle": "Disable everyone's camera except {{whom}}?",
245
         "muteEveryoneElsesVideoTitle": "Disable everyone's camera except {{whom}}?",
246
         "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.",
246
         "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.",
247
+        "muteEveryonesVideoDialogOk": "Disable",
247
         "muteEveryonesVideoTitle": "Disable everyone's camera?",
248
         "muteEveryonesVideoTitle": "Disable everyone's camera?",
248
         "muteEveryoneSelf": "yourself",
249
         "muteEveryoneSelf": "yourself",
249
         "muteEveryoneStartMuted": "Everyone starts muted from now on",
250
         "muteEveryoneStartMuted": "Everyone starts muted from now on",

+ 2
- 2
react/features/base/icons/svg/mute-video-everyone.svg Целия файл

3
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
 <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
 <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
 	 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
5
 	 width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
6
-<path fill="#A4B8D1" d="M3.136,7.1l14.448,14.447l-1.033,1.032l-2.598-2.599c-0.115,0.077-0.307,0.153-0.459,0.153H3.709
6
+<path d="M3.136,7.1l14.448,14.447l-1.033,1.032l-2.598-2.599c-0.115,0.077-0.307,0.153-0.459,0.153H3.709
7
 	c-0.458,0-0.803-0.346-0.803-0.804v-8.179c0-0.459,0.344-0.803,0.803-0.803h0.612L2.104,8.131L3.136,7.1z M17.584,10.769v8.714
7
 	c-0.458,0-0.803-0.346-0.803-0.804v-8.179c0-0.459,0.344-0.803,0.803-0.803h0.612L2.104,8.131L3.136,7.1z M17.584,10.769v8.714
8
 	l-9.135-9.134h5.045c0.459,0,0.84,0.344,0.84,0.803v2.866L17.584,10.769z"/>
8
 	l-9.135-9.134h5.045c0.459,0,0.84,0.344,0.84,0.803v2.866L17.584,10.769z"/>
9
-<path fill="#A4B8D1" d="M14.688,0.818l8.164,8.165l-0.584,0.583L20.8,8.098c-0.065,0.043-0.174,0.086-0.26,0.086h-5.528
9
+<path d="M14.688,0.818l8.164,8.165l-0.584,0.583L20.8,8.098c-0.065,0.043-0.174,0.086-0.26,0.086h-5.528
10
 	c-0.259,0-0.454-0.195-0.454-0.454V3.108c0-0.26,0.195-0.454,0.454-0.454h0.345l-1.253-1.253L14.688,0.818z M22.852,2.892v4.924
10
 	c-0.259,0-0.454-0.195-0.454-0.454V3.108c0-0.26,0.195-0.454,0.454-0.454h0.345l-1.253-1.253L14.688,0.818z M22.852,2.892v4.924
11
 	l-5.162-5.162h2.851c0.26,0,0.476,0.194,0.476,0.454v1.619L22.852,2.892z"/>
11
 	l-5.162-5.162h2.851c0.26,0,0.476,0.194,0.476,0.454v1.619L22.852,2.892z"/>
12
 </svg>
12
 </svg>

+ 0
- 1
react/features/toolbox/components/MuteEveryonesVideoButton.js Целия файл

35
     accessibilityLabel = 'toolbar.accessibilityLabel.muteEveryonesVideo';
35
     accessibilityLabel = 'toolbar.accessibilityLabel.muteEveryonesVideo';
36
     icon = IconMuteVideoEveryone;
36
     icon = IconMuteVideoEveryone;
37
     label = 'toolbar.muteEveryonesVideo';
37
     label = 'toolbar.muteEveryonesVideo';
38
-    tooltip = 'toolbar.muteVideoEveryone';
39
 
38
 
40
     /**
39
     /**
41
      * Handles clicking / pressing the button, and opens a confirmation dialog.
40
      * Handles clicking / pressing the button, and opens a confirmation dialog.

+ 2
- 0
react/features/toolbox/components/native/OverflowMenu.js Целия файл

21
 import { getMovableButtons } from '../../functions.native';
21
 import { getMovableButtons } from '../../functions.native';
22
 import HelpButton from '../HelpButton';
22
 import HelpButton from '../HelpButton';
23
 import MuteEveryoneButton from '../MuteEveryoneButton';
23
 import MuteEveryoneButton from '../MuteEveryoneButton';
24
+import MuteEveryonesVideoButton from '../MuteEveryonesVideoButton';
24
 
25
 
25
 import AudioOnlyButton from './AudioOnlyButton';
26
 import AudioOnlyButton from './AudioOnlyButton';
26
 import MoreOptionsButton from './MoreOptionsButton';
27
 import MoreOptionsButton from './MoreOptionsButton';
152
                     <ClosedCaptionButton { ...buttonProps } />
153
                     <ClosedCaptionButton { ...buttonProps } />
153
                     <SharedDocumentButton { ...buttonProps } />
154
                     <SharedDocumentButton { ...buttonProps } />
154
                     <MuteEveryoneButton { ...buttonProps } />
155
                     <MuteEveryoneButton { ...buttonProps } />
156
+                    <MuteEveryonesVideoButton { ...buttonProps } />
155
                     <HelpButton { ...buttonProps } />
157
                     <HelpButton { ...buttonProps } />
156
                 </Collapsible>
158
                 </Collapsible>
157
             </BottomSheet>
159
             </BottomSheet>

+ 5
- 0
react/features/toolbox/components/web/Toolbox.js Целия файл

80
 import HangupButton from '../HangupButton';
80
 import HangupButton from '../HangupButton';
81
 import HelpButton from '../HelpButton';
81
 import HelpButton from '../HelpButton';
82
 import MuteEveryoneButton from '../MuteEveryoneButton';
82
 import MuteEveryoneButton from '../MuteEveryoneButton';
83
+import MuteEveryonesVideoButton from '../MuteEveryonesVideoButton';
83
 
84
 
84
 import AudioSettingsButton from './AudioSettingsButton';
85
 import AudioSettingsButton from './AudioSettingsButton';
85
 import OverflowMenuButton from './OverflowMenuButton';
86
 import OverflowMenuButton from './OverflowMenuButton';
1008
                 && <MuteEveryoneButton
1009
                 && <MuteEveryoneButton
1009
                     key = 'mute-everyone'
1010
                     key = 'mute-everyone'
1010
                     showLabel = { true } />,
1011
                     showLabel = { true } />,
1012
+            this._shouldShowButton('mute-video-everyone')
1013
+                && <MuteEveryonesVideoButton
1014
+                    key = 'mute-everyones-video'
1015
+                    showLabel = { true } />,
1011
             this._shouldShowButton('livestreaming')
1016
             this._shouldShowButton('livestreaming')
1012
                 && <LiveStreamButton
1017
                 && <LiveStreamButton
1013
                     key = 'livestreaming'
1018
                     key = 'livestreaming'

+ 67
- 0
react/features/video-menu/components/native/MuteEveryonesVideoDialog.js Целия файл

1
+// @flow
2
+
3
+import React from 'react';
4
+import { Text } from 'react-native';
5
+
6
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
7
+import { ConfirmDialog } from '../../../base/dialog';
8
+import { translate } from '../../../base/i18n';
9
+import { connect } from '../../../base/redux';
10
+import { StyleType } from '../../../base/styles';
11
+import AbstractMuteEveryonesVideoDialog, {
12
+    abstractMapStateToProps,
13
+    type Props as AbstractProps } from '../AbstractMuteEveryonesVideoDialog';
14
+
15
+type Props = AbstractProps & {
16
+
17
+    /**
18
+     * The color-schemed stylesheet of the base/dialog feature.
19
+     */
20
+    _dialogStyles: StyleType
21
+}
22
+
23
+/**
24
+ * A React Component with the contents for a dialog that asks for confirmation
25
+ * from the user before muting all remote participants.
26
+ *
27
+ * @extends AbstractMuteEveryoneDialog
28
+ */
29
+class MuteEveryonesVideoDialog extends AbstractMuteEveryonesVideoDialog<Props> {
30
+
31
+    /**
32
+     * Implements {@code Component#render}.
33
+     *
34
+     * @inheritdoc
35
+     */
36
+    render() {
37
+        return (
38
+            <ConfirmDialog
39
+                okKey = 'dialog.muteEveryonesVideoDialogOk'
40
+                onSubmit = { this._onSubmit } >
41
+                <Text style = { this.props._dialogStyles.text }>
42
+                    { `${this.props.title} \n\n ${this.props.content}` }
43
+                </Text>
44
+            </ConfirmDialog>
45
+        );
46
+    }
47
+
48
+    _onSubmit: () => boolean;
49
+}
50
+
51
+/**
52
+ * Maps part of the Redux state to the props of this component.
53
+ *
54
+ * @param {Object} state - The Redux state.
55
+ * @param {Props} ownProps - The own props of the component.
56
+ * @returns {{
57
+    *     _dialogStyles: StyleType
58
+    * }}
59
+ */
60
+function _mapStateToProps(state: Object, ownProps: Props) {
61
+    return {
62
+        ...abstractMapStateToProps(state, ownProps),
63
+        _dialogStyles: ColorSchemeRegistry.get(state, 'Dialog')
64
+    };
65
+}
66
+
67
+export default translate(connect(_mapStateToProps)(MuteEveryonesVideoDialog));

+ 1
- 0
react/features/video-menu/components/native/index.js Целия файл

3
 export { default as GrantModeratorDialog } from './GrantModeratorDialog';
3
 export { default as GrantModeratorDialog } from './GrantModeratorDialog';
4
 export { default as KickRemoteParticipantDialog } from './KickRemoteParticipantDialog';
4
 export { default as KickRemoteParticipantDialog } from './KickRemoteParticipantDialog';
5
 export { default as MuteEveryoneDialog } from './MuteEveryoneDialog';
5
 export { default as MuteEveryoneDialog } from './MuteEveryoneDialog';
6
+export { default as MuteEveryonesVideoDialog } from './MuteEveryonesVideoDialog';
6
 export { default as MuteRemoteParticipantDialog } from './MuteRemoteParticipantDialog';
7
 export { default as MuteRemoteParticipantDialog } from './MuteRemoteParticipantDialog';
7
 export { default as RemoteVideoMenu } from './RemoteVideoMenu';
8
 export { default as RemoteVideoMenu } from './RemoteVideoMenu';

Loading…
Отказ
Запис