fix(self-view) Add Show self view button in overflow menu (#11568)
This commit is contained in:
parent
b4febf728d
commit
607021a890
|
@ -28,6 +28,7 @@ import OpenCarmodeButton from './OpenCarmodeButton';
|
||||||
import RaiseHandButton from './RaiseHandButton';
|
import RaiseHandButton from './RaiseHandButton';
|
||||||
import ScreenSharingButton from './ScreenSharingButton';
|
import ScreenSharingButton from './ScreenSharingButton';
|
||||||
import ToggleCameraButton from './ToggleCameraButton';
|
import ToggleCameraButton from './ToggleCameraButton';
|
||||||
|
import ToggleSelfViewButton from './ToggleSelfViewButton';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the React {@code Component} props of {@link OverflowMenu}.
|
* The type of the React {@code Component} props of {@link OverflowMenu}.
|
||||||
|
@ -49,6 +50,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
_recordingEnabled: boolean,
|
_recordingEnabled: boolean,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether or not the self view is hidden.
|
||||||
|
*/
|
||||||
|
_selfViewHidden: boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The width of the screen.
|
* The width of the screen.
|
||||||
*/
|
*/
|
||||||
|
@ -113,8 +119,9 @@ class OverflowMenu extends PureComponent<Props, State> {
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
_bottomSheetStyles,
|
_bottomSheetStyles,
|
||||||
_width,
|
_reactionsEnabled,
|
||||||
_reactionsEnabled
|
_selfViewHidden,
|
||||||
|
_width
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const toolbarButtons = getMovableButtons(_width);
|
const toolbarButtons = getMovableButtons(_width);
|
||||||
|
|
||||||
|
@ -144,7 +151,8 @@ class OverflowMenu extends PureComponent<Props, State> {
|
||||||
? this._renderReactionMenu
|
? this._renderReactionMenu
|
||||||
: null }>
|
: null }>
|
||||||
<ParticipantsPaneButton { ...topButtonProps } />
|
<ParticipantsPaneButton { ...topButtonProps } />
|
||||||
<OpenCarmodeButton { ...topButtonProps } />
|
{_selfViewHidden && <ToggleSelfViewButton { ...buttonProps } />}
|
||||||
|
<OpenCarmodeButton { ...buttonProps } />
|
||||||
<AudioOnlyButton { ...buttonProps } />
|
<AudioOnlyButton { ...buttonProps } />
|
||||||
{!_reactionsEnabled && !toolbarButtons.has('raisehand') && <RaiseHandButton { ...buttonProps } />}
|
{!_reactionsEnabled && !toolbarButtons.has('raisehand') && <RaiseHandButton { ...buttonProps } />}
|
||||||
<Divider style = { styles.divider } />
|
<Divider style = { styles.divider } />
|
||||||
|
@ -206,11 +214,14 @@ class OverflowMenu extends PureComponent<Props, State> {
|
||||||
* @returns {Props}
|
* @returns {Props}
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state) {
|
||||||
|
const { disableSelfView } = state['features/base/settings'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_bottomSheetStyles: ColorSchemeRegistry.get(state, 'BottomSheet'),
|
_bottomSheetStyles: ColorSchemeRegistry.get(state, 'BottomSheet'),
|
||||||
_isOpen: isDialogOpen(state, OverflowMenu_),
|
_isOpen: isDialogOpen(state, OverflowMenu_),
|
||||||
_width: state['features/base/responsive-ui'].clientWidth,
|
_reactionsEnabled: isReactionsEnabled(state),
|
||||||
_reactionsEnabled: isReactionsEnabled(state)
|
_selfViewHidden: Boolean(disableSelfView),
|
||||||
|
_width: state['features/base/responsive-ui'].clientWidth
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue