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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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