change LocalRecordingInfoDialog

This commit is contained in:
Radium Zheng 2018-07-19 08:29:24 +10:00
parent 8ebf2b7e47
commit 52b55d65a0
2 changed files with 39 additions and 48 deletions

View File

@ -148,32 +148,28 @@ class LocalRecordingInfoDialog extends Component<Props, State> {
const { isModerator, t } = this.props; const { isModerator, t } = this.props;
return ( return (
<div <Dialog
className = 'info-dialog' > cancelTitleKey = { 'dialog.close' }
<div className = 'info-dialog-column'> submitDisabled = { true }
<h4 className = 'info-dialog-icon'> titleKey = 'localRecording.dialogTitle'>
<i className = 'icon-info' /> <div className = 'info-dialog'>
</h4> <div className = 'info-dialog-column'>
</div> <div>
<div className = 'info-dialog-column'> <span className = 'info-label'>
<div className = 'info-dialog-title'> {`${t('localRecording.moderator')}:`}
{ t('localRecording.localRecording') } </span>
<span className = 'spacer'>&nbsp;</span>
<span className = 'info-value'>
{ isModerator
? t('localRecording.yes')
: t('localRecording.no') }
</span>
</div>
{ this._renderDurationAndFormat() }
{ this._renderModeratorControls() }
</div> </div>
<div>
<span className = 'info-label'>
{`${t('localRecording.moderator')}:`}
</span>
<span className = 'spacer'>&nbsp;</span>
<span className = 'info-value'>
{ isModerator
? t('localRecording.yes')
: t('localRecording.no') }
</span>
</div>
{ this._renderDurationAndFormat() }
{ this._renderModeratorControls() }
</div> </div>
</div> </Dialog>
); );
} }
@ -280,32 +276,27 @@ class LocalRecordingInfoDialog extends Component<Props, State> {
} }
return ( return (
<Dialog <div>
cancelTitleKey = { 'dialog.close' } <div>
submitDisabled = { true } <span className = 'info-label'>
titleKey = 'localRecording.dialogTitle'> {`${t('localRecording.participantStats')}:`}
<div className = 'local-recording'> </span>
<div> </div>
<span className = 'info-label'> { this._renderStats() }
{`${t('localRecording.participantStats')}:`} <div className = 'info-dialog-action-links'>
</span> <div className = 'info-dialog-action-link'>
</div> { isEngaged ? <a
{ this._renderStats() } onClick = { this._onStop }>
<div className = 'info-dialog-action-links'> { t('localRecording.stop') }
<div className = 'info-dialog-action-link'> </a>
{ isEngaged ? <a : <a
onClick = { this._onStop }> onClick = { this._onStart }>
{ t('localRecording.stop') } { t('localRecording.start') }
</a> </a>
: <a }
onClick = { this._onStart }>
{ t('localRecording.start') }
</a>
}
</div>
</div> </div>
</div> </div>
</Dialog> </div>
); );
} }

View File

@ -27,7 +27,7 @@ MiddlewareRegistry.register(({ getState, dispatch }) => next => action => {
case APP_WILL_MOUNT: case APP_WILL_MOUNT:
// realize the delegates on recordingController, allowing the UI to // realize the delegates on recordingController, allowing the UI to
// react to state changes in recordingController. // react to state changes in recordingController.
recordingController.onStateChanged = function(isEngaged) { recordingController.onStateChanged = isEngaged => {
if (isEngaged) { if (isEngaged) {
const nowTime = new Date(); const nowTime = new Date();