mirror of https://github.com/jitsi/jitsi-meet
parent
4bc09dd8b9
commit
62e7fd7e8e
@ -0,0 +1,54 @@ |
||||
// @flow
|
||||
|
||||
import React from 'react'; |
||||
import { connect } from 'react-redux'; |
||||
|
||||
import { translate } from '../../../../base/i18n'; |
||||
import { ConfirmDialog, CustomSubmitDialog } from '../../../../base/dialog'; |
||||
|
||||
import AbstractStartRecordingDialog, { |
||||
mapStateToProps |
||||
} from '../AbstractStartRecordingDialog'; |
||||
import StartRecordingDialogContent from '../StartRecordingDialogContent'; |
||||
|
||||
/** |
||||
* React Component for getting confirmation to start a file recording session in |
||||
* progress. |
||||
* |
||||
* @extends Component |
||||
*/ |
||||
class StartRecordingDialog extends AbstractStartRecordingDialog { |
||||
/** |
||||
* Implements React's {@link Component#render()}. |
||||
* |
||||
* @inheritdoc |
||||
*/ |
||||
render() { |
||||
const { isTokenValid, isValidating, spaceLeft, userName } = this.state; |
||||
const { _isDropboxEnabled } = this.props; |
||||
|
||||
if (!_isDropboxEnabled) { |
||||
return ( |
||||
<ConfirmDialog |
||||
contentKey = 'recording.startRecordingBody' |
||||
onSubmit = { this._onSubmit } /> |
||||
); |
||||
} |
||||
|
||||
return ( |
||||
<CustomSubmitDialog |
||||
okDisabled = { !isTokenValid } |
||||
onSubmit = { this._onSubmit } > |
||||
<StartRecordingDialogContent |
||||
isTokenValid = { isTokenValid } |
||||
isValidating = { isValidating } |
||||
spaceLeft = { spaceLeft } |
||||
userName = { userName } /> |
||||
</CustomSubmitDialog> |
||||
); |
||||
} |
||||
|
||||
_onSubmit: () => boolean |
||||
} |
||||
|
||||
export default translate(connect(mapStateToProps)(StartRecordingDialog)); |
@ -1,4 +1,5 @@ |
||||
// @flow
|
||||
|
||||
export { default as RecordButton } from './RecordButton'; |
||||
export { default as StartRecordingDialog } from './StartRecordingDialog'; |
||||
export { default as StopRecordingDialog } from './StopRecordingDialog'; |
||||
|
@ -0,0 +1,50 @@ |
||||
// @flow
|
||||
|
||||
import React from 'react'; |
||||
import { connect } from 'react-redux'; |
||||
|
||||
import { translate } from '../../../../base/i18n'; |
||||
import { Dialog } from '../../../../base/dialog'; |
||||
|
||||
import AbstractStartRecordingDialog, { |
||||
mapStateToProps |
||||
} from '../AbstractStartRecordingDialog'; |
||||
import StartRecordingDialogContent from '../StartRecordingDialogContent'; |
||||
|
||||
/** |
||||
* React Component for getting confirmation to start a file recording session in |
||||
* progress. |
||||
* |
||||
* @extends Component |
||||
*/ |
||||
class StartRecordingDialog extends AbstractStartRecordingDialog { |
||||
/** |
||||
* Implements React's {@link Component#render()}. |
||||
* |
||||
* @inheritdoc |
||||
*/ |
||||
render() { |
||||
const { isTokenValid, isValidating, spaceLeft, userName } = this.state; |
||||
const { _isDropboxEnabled } = this.props; |
||||
|
||||
return ( |
||||
<Dialog |
||||
okDisabled = { !isTokenValid && _isDropboxEnabled } |
||||
okTitleKey = 'dialog.confirm' |
||||
onSubmit = { this._onSubmit } |
||||
titleKey = 'dialog.recording' |
||||
width = 'small'> |
||||
<StartRecordingDialogContent |
||||
integrationsEnabled = { _isDropboxEnabled } |
||||
isTokenValid = { isTokenValid } |
||||
isValidating = { isValidating } |
||||
spaceLeft = { spaceLeft } |
||||
userName = { userName } /> |
||||
</Dialog> |
||||
); |
||||
} |
||||
|
||||
_onSubmit: () => boolean |
||||
} |
||||
|
||||
export default translate(connect(mapStateToProps)(StartRecordingDialog)); |
@ -1,4 +1,5 @@ |
||||
// @flow
|
||||
|
||||
export { default as RecordButton } from './RecordButton'; |
||||
export { default as StartRecordingDialog } from './StartRecordingDialog'; |
||||
export { default as StopRecordingDialog } from './StopRecordingDialog'; |
||||
|
Loading…
Reference in new issue