summaryrefslogtreecommitdiffstats
path: root/webapp/components/channel_info_modal.jsx
diff options
context:
space:
mode:
authorRyan Wang <R-Wang97@users.noreply.github.com>2017-03-24 05:17:01 -0400
committerGeorge Goldberg <george@gberg.me>2017-03-24 09:17:01 +0000
commit4c1eb7ff5575be07b8410e76da4cdaa964c2ef91 (patch)
treeb2e042f91901c5dc7583c992045ee6e6858c6d73 /webapp/components/channel_info_modal.jsx
parent3ea091fd6df6b175bda64db81589f6936589d5d2 (diff)
downloadchat-4c1eb7ff5575be07b8410e76da4cdaa964c2ef91.tar.gz
chat-4c1eb7ff5575be07b8410e76da4cdaa964c2ef91.tar.bz2
chat-4c1eb7ff5575be07b8410e76da4cdaa964c2ef91.zip
Update default town square purpose (#5810)
Diffstat (limited to 'webapp/components/channel_info_modal.jsx')
-rw-r--r--webapp/components/channel_info_modal.jsx19
1 files changed, 16 insertions, 3 deletions
diff --git a/webapp/components/channel_info_modal.jsx b/webapp/components/channel_info_modal.jsx
index fce4b75db..4829d1dd9 100644
--- a/webapp/components/channel_info_modal.jsx
+++ b/webapp/components/channel_info_modal.jsx
@@ -2,6 +2,7 @@
// See License.txt for license information.
import * as Utils from 'utils/utils.jsx';
+import Constants from 'utils/constants.jsx';
import {FormattedMessage} from 'react-intl';
import {Modal} from 'react-bootstrap';
@@ -47,9 +48,21 @@ export default class ChannelInfoModal extends React.Component {
const channelURL = TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name;
- let channelPurpose = null;
+ let channelPurpose;
if (channel.purpose) {
+ channelPurpose = channel.purpose;
+ } else if (channel.name === Constants.DEFAULT_CHANNEL) {
channelPurpose = (
+ <FormattedMessage
+ id='default_channel.purpose'
+ defaultMessage='Post messages here that you want everyone to see. Everyone automatically becomes a permanent member of this channel when they join the team.'
+ />
+ );
+ }
+
+ let channelPurposeElement;
+ if (channelPurpose) {
+ channelPurposeElement = (
<div className='form-group'>
<div className='info__label'>
<FormattedMessage
@@ -57,7 +70,7 @@ export default class ChannelInfoModal extends React.Component {
defaultMessage='Purpose:'
/>
</div>
- <div className='info__value'>{channel.purpose}</div>
+ <div className='info__value'>{channelPurpose}</div>
</div>
);
}
@@ -97,7 +110,7 @@ export default class ChannelInfoModal extends React.Component {
</Modal.Title>
</Modal.Header>
<Modal.Body ref='modalBody'>
- {channelPurpose}
+ {channelPurposeElement}
{channelHeader}
<div className='form-group'>
<div className='info__label'>