Changed BOT to constant
Этот коммит содержится в:
David Lu
2016-05-27 08:38:35 -07:00
коммит произвёл Corey Hulen
родитель 97a4310610
Коммит 1736947f0e
4 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@@ -32,7 +32,7 @@ export default class PostHeader extends React.Component {
); );
} }
botIndicator = <li className='col col__name bot-indicator'>{'BOT'}</li>; botIndicator = <li className='col col__name bot-indicator'>{Constants.BOT_NAME}</li>;
} else if (Utils.isSystemMessage(post)) { } else if (Utils.isSystemMessage(post)) {
userProfile = ( userProfile = (
<UserProfile <UserProfile

Просмотреть файл

@@ -151,6 +151,11 @@ export default class RhsComment extends React.Component {
var timestamp = this.props.currentUser.update_at; var timestamp = this.props.currentUser.update_at;
let botIndicator;
if (post.props && post.props.from_webhook) {
botIndicator = <li className='col col__name bot-indicator'>{Constants.BOT_NAME}</li>;
}
let loading; let loading;
let postClass = ''; let postClass = '';
let message = ( let message = (
@@ -206,9 +211,10 @@ export default class RhsComment extends React.Component {
</div> </div>
<div> <div>
<ul className='post__header'> <ul className='post__header'>
<li className='col__name'> <li className='col col__name'>
<strong><UserProfile user={this.props.user}/></strong> <strong><UserProfile user={this.props.user}/></strong>
</li> </li>
{botIndicator}
<li className='col'> <li className='col'>
<time className='post__time'> <time className='post__time'>
<FormattedDate <FormattedDate

Просмотреть файл

@@ -67,6 +67,12 @@ export default class SearchResultsItem extends React.Component {
disableProfilePopover = true; disableProfilePopover = true;
} }
let botIndicator;
if (post.props && post.props.from_webhook) {
botIndicator = <li className='col col__name bot-indicator'>{Constants.BOT_NAME}</li>;
}
return ( return (
<div className='search-item__container'> <div className='search-item__container'>
<div className='date-separator'> <div className='date-separator'>
@@ -94,13 +100,14 @@ export default class SearchResultsItem extends React.Component {
</div> </div>
<div> <div>
<ul className='post__header'> <ul className='post__header'>
<li className='col__name'><strong> <li className='col col__name'><strong>
<UserProfile <UserProfile
user={user} user={user}
overwriteName={overrideUsername} overwriteName={overrideUsername}
disablePopover={disableProfilePopover} disablePopover={disableProfilePopover}
/> />
</strong></li> </strong></li>
{botIndicator}
<li className='col'> <li className='col'>
<time className='search-item-time'> <time className='search-item-time'>
<FormattedDate <FormattedDate

Просмотреть файл

@@ -737,5 +737,6 @@ export default {
EMOJI_PATH: '/static/emoji', EMOJI_PATH: '/static/emoji',
DEFAULT_WEBHOOK_LOGO: logoWebhook, DEFAULT_WEBHOOK_LOGO: logoWebhook,
MHPNS: 'https://push.mattermost.com', MHPNS: 'https://push.mattermost.com',
MTPNS: 'http://push-test.mattermost.com' MTPNS: 'http://push-test.mattermost.com',
BOT_NAME: 'BOT'
}; };