|
@@ -18,7 +18,6 @@ import {
|
18
|
18
|
} from '../../base/participants';
|
19
|
19
|
import { getLocalVideoTrack, toggleScreensharing } from '../../base/tracks';
|
20
|
20
|
import { ChatCounter } from '../../chat';
|
21
|
|
-import { openDeviceSelectionDialog } from '../../device-selection';
|
22
|
21
|
import { toggleDocument } from '../../etherpad';
|
23
|
22
|
import { openFeedbackDialog } from '../../feedback';
|
24
|
23
|
import {
|
|
@@ -30,8 +29,7 @@ import {
|
30
|
29
|
import { openKeyboardShortcutsDialog } from '../../keyboard-shortcuts';
|
31
|
30
|
import { RECORDING_TYPES, toggleRecording } from '../../recording';
|
32
|
31
|
import { toggleSharedVideo } from '../../shared-video';
|
33
|
|
-import { shouldShowOnlyDeviceSelection } from '../../settings';
|
34
|
|
-import { toggleChat, toggleProfile, toggleSettings } from '../../side-panel';
|
|
32
|
+import { toggleChat, toggleProfile } from '../../side-panel';
|
35
|
33
|
import { SpeakerStats } from '../../speaker-stats';
|
36
|
34
|
import {
|
37
|
35
|
OverflowMenuVideoQualityItem,
|
|
@@ -44,7 +42,12 @@ import OverflowMenuButton from './OverflowMenuButton';
|
44
|
42
|
import OverflowMenuItem from './OverflowMenuItem';
|
45
|
43
|
import OverflowMenuProfileItem from './OverflowMenuProfileItem';
|
46
|
44
|
import ToolbarButton from './ToolbarButton';
|
47
|
|
-import { AudioMuteButton, HangupButton, VideoMuteButton } from './buttons';
|
|
45
|
+import {
|
|
46
|
+ AudioMuteButton,
|
|
47
|
+ HangupButton,
|
|
48
|
+ SettingsButton,
|
|
49
|
+ VideoMuteButton
|
|
50
|
+} from './buttons';
|
48
|
51
|
|
49
|
52
|
type Props = {
|
50
|
53
|
|
|
@@ -227,8 +230,6 @@ class Toolbox extends Component<Props, State> {
|
227
|
230
|
= this._onToolbarToggleRecording.bind(this);
|
228
|
231
|
this._onToolbarToggleScreenshare
|
229
|
232
|
= this._onToolbarToggleScreenshare.bind(this);
|
230
|
|
- this._onToolbarToggleSettings
|
231
|
|
- = this._onToolbarToggleSettings.bind(this);
|
232
|
233
|
this._onToolbarToggleSharedVideo
|
233
|
234
|
= this._onToolbarToggleSharedVideo.bind(this);
|
234
|
235
|
}
|
|
@@ -509,21 +510,6 @@ class Toolbox extends Component<Props, State> {
|
509
|
510
|
}
|
510
|
511
|
}
|
511
|
512
|
|
512
|
|
- /**
|
513
|
|
- * Dispatches an action to toggle display of settings, be it the settings
|
514
|
|
- * panel or directly to device selection.
|
515
|
|
- *
|
516
|
|
- * @private
|
517
|
|
- * @returns {void}
|
518
|
|
- */
|
519
|
|
- _doToggleSettings() {
|
520
|
|
- if (shouldShowOnlyDeviceSelection()) {
|
521
|
|
- this.props.dispatch(openDeviceSelectionDialog());
|
522
|
|
- } else {
|
523
|
|
- this.props.dispatch(toggleSettings());
|
524
|
|
- }
|
525
|
|
- }
|
526
|
|
-
|
527
|
513
|
/**
|
528
|
514
|
* Dispatches an action to toggle YouTube video sharing.
|
529
|
515
|
*
|
|
@@ -862,21 +848,6 @@ class Toolbox extends Component<Props, State> {
|
862
|
848
|
this._doToggleScreenshare();
|
863
|
849
|
}
|
864
|
850
|
|
865
|
|
- _onToolbarToggleSettings: () => void;
|
866
|
|
-
|
867
|
|
- /**
|
868
|
|
- * Creates an analytics toolbar event and dispatches an action for toggling
|
869
|
|
- * settings display.
|
870
|
|
- *
|
871
|
|
- * @private
|
872
|
|
- * @returns {void}
|
873
|
|
- */
|
874
|
|
- _onToolbarToggleSettings() {
|
875
|
|
- sendAnalytics(createToolbarEvent('settings'));
|
876
|
|
-
|
877
|
|
- this._doToggleSettings();
|
878
|
|
- }
|
879
|
|
-
|
880
|
851
|
_onToolbarToggleSharedVideo: () => void;
|
881
|
852
|
|
882
|
853
|
/**
|
|
@@ -993,13 +964,10 @@ class Toolbox extends Component<Props, State> {
|
993
|
964
|
text = { _editingDocument
|
994
|
965
|
? t('toolbar.documentClose')
|
995
|
966
|
: t('toolbar.documentOpen') } />,
|
996
|
|
- this._shouldShowButton('settings')
|
997
|
|
- && <OverflowMenuItem
|
998
|
|
- accessibilityLabel = 'Settings'
|
999
|
|
- icon = 'icon-settings'
|
1000
|
|
- key = 'settings'
|
1001
|
|
- onClick = { this._onToolbarToggleSettings }
|
1002
|
|
- text = { t('toolbar.Settings') } />,
|
|
967
|
+ <SettingsButton
|
|
968
|
+ key = 'settings'
|
|
969
|
+ showLabel = { true }
|
|
970
|
+ visible = { this._shouldShowButton('settings') } />,
|
1003
|
971
|
this._shouldShowButton('stats')
|
1004
|
972
|
&& <OverflowMenuItem
|
1005
|
973
|
accessibilityLabel = 'Speaker stats'
|