guard LocalRecordingButton with _shouldShowButton

This commit is contained in:
Radium Zheng 2018-07-10 00:14:29 +10:00
parent 55a2ef30a0
commit 3241c7a929
2 changed files with 10 additions and 6 deletions

View File

@ -48,7 +48,8 @@ var interfaceConfig = {
'microphone', 'camera', 'closedcaptions', 'desktop', 'fullscreen', 'microphone', 'camera', 'closedcaptions', 'desktop', 'fullscreen',
'fodeviceselection', 'hangup', 'profile', 'info', 'chat', 'recording', 'fodeviceselection', 'hangup', 'profile', 'info', 'chat', 'recording',
'livestreaming', 'etherpad', 'sharedvideo', 'settings', 'raisehand', 'livestreaming', 'etherpad', 'sharedvideo', 'settings', 'raisehand',
'videoquality', 'filmstrip', 'invite', 'feedback', 'stats', 'shortcuts' 'videoquality', 'filmstrip', 'invite', 'feedback', 'stats', 'shortcuts',
'localrecording'
], ],
SETTINGS_SECTIONS: [ 'devices', 'language', 'moderator', 'profile' ], SETTINGS_SECTIONS: [ 'devices', 'language', 'moderator', 'profile' ],

View File

@ -381,11 +381,14 @@ class Toolbox extends Component<Props> {
visible = { this._shouldShowButton('camera') } /> visible = { this._shouldShowButton('camera') } />
</div> </div>
<div className = 'button-group-right'> <div className = 'button-group-right'>
<LocalRecordingButton { this._shouldShowButton('localrecording')
isDialogShown = { this.props._localRecState.showDialog } && <LocalRecordingButton
onClick = { isDialogShown =
this._onToolbarToggleLocalRecordingInfoDialog { this.props._localRecState.showDialog }
} /> onClick = {
this._onToolbarToggleLocalRecordingInfoDialog
} />
}
{ this._shouldShowButton('invite') { this._shouldShowButton('invite')
&& !_hideInviteButton && !_hideInviteButton
&& <ToolbarButton && <ToolbarButton