diff options
author | David Lu <david.lu@hotmail.com> | 2016-06-27 07:48:48 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-06-27 07:48:48 -0400 |
commit | 0267d520dd6227bff5ed5e9a39e4162cc63d92c3 (patch) | |
tree | 873f2c2aa5997534b427a203f6d0d93d837ecd4c /webapp/components | |
parent | 4e67d0777f0437c5a09a5e0a08a3deb279bd2177 (diff) | |
download | chat-0267d520dd6227bff5ed5e9a39e4162cc63d92c3.tar.gz chat-0267d520dd6227bff5ed5e9a39e4162cc63d92c3.tar.bz2 chat-0267d520dd6227bff5ed5e9a39e4162cc63d92c3.zip |
changed edit header title for DM channels (#3415)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/edit_channel_header_modal.jsx | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/webapp/components/edit_channel_header_modal.jsx b/webapp/components/edit_channel_header_modal.jsx index ea411357d..d7ef1d81f 100644 --- a/webapp/components/edit_channel_header_modal.jsx +++ b/webapp/components/edit_channel_header_modal.jsx @@ -129,6 +129,26 @@ class EditChannelHeaderModal extends React.Component { serverError = <div className='form-group has-error'><br/><label className='control-label'>{this.state.serverError}</label></div>; } + let headerTitle = null; + if (this.props.channel.type === Constants.DM_CHANNEL) { + headerTitle = ( + <FormattedMessage + id='edit_channel_header_modal.title_dm' + defaultMessage='Edit Header' + /> + ); + } else { + headerTitle = ( + <FormattedMessage + id='edit_channel_header_modal.title' + defaultMessage='Edit Header for {channel}' + values={{ + channel: this.props.channel.display_name + }} + /> + ); + } + return ( <Modal show={this.props.show} @@ -136,13 +156,7 @@ class EditChannelHeaderModal extends React.Component { > <Modal.Header closeButton={true}> <Modal.Title> - <FormattedMessage - id='edit_channel_header_modal.title' - defaultMessage='Edit Header for {channel}' - values={{ - channel: this.props.channel.display_name - }} - /> + {headerTitle} </Modal.Title> </Modal.Header> <Modal.Body> |