Change dialog button property keys

This commit is contained in:
Bettenbuk Zoltan 2019-03-06 18:23:53 +01:00 committed by Zoltan Bettenbuk
parent 31c1034be7
commit ebdcbe122a
17 changed files with 20 additions and 20 deletions

View File

@ -239,7 +239,7 @@ class StatelessDialog extends Component<Props> {
key = 'cancel'
onClick = { this._onCancel }
type = 'button'>
{ t(this.props.cancelTitleKey || 'dialog.Cancel') }
{ t(this.props.cancelKey || 'dialog.Cancel') }
</Button>
);
}
@ -268,7 +268,7 @@ class StatelessDialog extends Component<Props> {
key = 'submit'
onClick = { this._onSubmit }
type = 'button'>
{ t(this.props.okTitleKey || 'dialog.Ok') }
{ t(this.props.okKey || 'dialog.Ok') }
</Button>
);
}

View File

@ -10,7 +10,7 @@ export type DialogProps = {
/**
* Optional i18n key to change the cancel button title.
*/
cancelTitleKey: string,
cancelKey: string,
/**
* The React {@code Component} children which represents the dialog's body.
@ -25,7 +25,7 @@ export type DialogProps = {
/**
* Optional i18n key to change the ok button title.
*/
okTitleKey: string,
okKey: string,
/**
* The handler for onCancel event.

View File

@ -189,7 +189,7 @@ class DesktopPicker extends PureComponent<Props, State> {
<Dialog
isModal = { false }
okDisabled = { Boolean(!this.state.selectedSource.id) }
okTitleKey = 'dialog.Share'
okKey = 'dialog.Share'
onCancel = { this._onCloseModal }
onSubmit = { this._onSubmit }
titleKey = 'dialog.shareYourScreen'

View File

@ -228,7 +228,7 @@ class FeedbackDialog extends Component<Props, State> {
return (
<Dialog
okTitleKey = 'dialog.Submit'
okKey = 'dialog.Submit'
onCancel = { this._onCancel }
onSubmit = { this._onSubmit }
titleKey = 'feedback.rateExperience'>

View File

@ -176,7 +176,7 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
return (
<Dialog
okDisabled = { this._isAddDisabled() }
okTitleKey = 'addPeople.add'
okKey = 'addPeople.add'
onSubmit = { this._onSubmit }
titleKey = 'addPeople.title'
width = 'medium'>

View File

@ -42,7 +42,7 @@ class KeyboardShortcutsDialog extends Component<Props> {
return (
<Dialog
cancelTitleKey = { 'dialog.close' }
cancelKey = { 'dialog.close' }
submitDisabled = { true }
titleKey = 'keyboardShortcuts.keyboardShortcuts'
width = 'small'>

View File

@ -149,7 +149,7 @@ class LocalRecordingInfoDialog extends Component<Props, State> {
return (
<Dialog
cancelTitleKey = { 'dialog.close' }
cancelKey = { 'dialog.close' }
submitDisabled = { true }
titleKey = 'localRecording.dialogTitle'>
<div className = 'localrec-control'>

View File

@ -47,7 +47,7 @@ class StartLiveStreamDialog extends AbstractStartLiveStreamDialog<Props> {
render() {
return (
<CustomSubmitDialog
okTitleKey = 'dialog.startLiveStreaming'
okKey = 'dialog.startLiveStreaming'
onCancel = { this._onCancel }
onSubmit = { this._onSubmit } >
<View style = { styles.startDialogWrapper }>

View File

@ -87,8 +87,8 @@ class StartLiveStreamDialog
return (
<Dialog
cancelTitleKey = 'dialog.Cancel'
okTitleKey = 'dialog.startLiveStreaming'
cancelKey = 'dialog.Cancel'
okKey = 'dialog.startLiveStreaming'
onCancel = { this._onCancel }
onSubmit = { this._onSubmit }
titleKey = 'liveStreaming.start'

View File

@ -27,7 +27,7 @@ class StopLiveStreamDialog extends AbstractStopLiveStreamDialog {
render() {
return (
<Dialog
okTitleKey = 'dialog.stopLiveStreaming'
okKey = 'dialog.stopLiveStreaming'
onSubmit = { this._onSubmit }
titleKey = 'dialog.liveStreaming'
width = 'small'>

View File

@ -30,7 +30,7 @@ class StartRecordingDialog extends AbstractStartRecordingDialog {
return (
<Dialog
okDisabled = { !isTokenValid && _isDropboxEnabled }
okTitleKey = 'dialog.confirm'
okKey = 'dialog.confirm'
onSubmit = { this._onSubmit }
titleKey = 'dialog.recording'
width = 'small'>

View File

@ -29,7 +29,7 @@ class StopRecordingDialog extends AbstractStopRecordingDialog<Props> {
return (
<Dialog
okTitleKey = 'dialog.confirm'
okKey = 'dialog.confirm'
onSubmit = { this._onSubmit }
titleKey = 'dialog.recording'
width = 'small'>

View File

@ -63,7 +63,7 @@ class RemoteControlAuthorizationDialog extends Component<Props> {
render() {
return (
<Dialog
okTitleKey = { 'dialog.allow' }
okKey = { 'dialog.allow' }
onCancel = { this._onCancel }
onSubmit = { this._onSubmit }
titleKey = 'dialog.remoteControlTitle'

View File

@ -22,7 +22,7 @@ class KickRemoteParticipantDialog extends AbstractKickRemoteParticipantDialog {
render() {
return (
<Dialog
okTitleKey = 'dialog.kickParticipantButton'
okKey = 'dialog.kickParticipantButton'
onSubmit = { this._onSubmit }
titleKey = 'dialog.kickParticipantTitle'
width = 'small'>

View File

@ -25,7 +25,7 @@ class MuteRemoteParticipantDialog extends AbstractMuteRemoteParticipantDialog {
render() {
return (
<Dialog
okTitleKey = 'dialog.muteParticipantButton'
okKey = 'dialog.muteParticipantButton'
onSubmit = { this._onSubmit }
titleKey = 'dialog.muteParticipantTitle'
width = 'small'>

View File

@ -99,7 +99,7 @@ class SpeakerStats extends Component<Props, State> {
return (
<Dialog
cancelTitleKey = { 'dialog.close' }
cancelKey = { 'dialog.close' }
submitDisabled = { true }
titleKey = 'speakerStats.speakerStats'>
<div className = 'speaker-stats'>

View File

@ -21,7 +21,7 @@ export default class VideoQualityDialog extends Component {
return (
<Dialog
hideCancelButton = { true }
okTitleKey = 'dialog.done'
okKey = 'dialog.done'
titleKey = 'videoStatus.callQuality'
width = 'small'>
<VideoQualitySlider />