diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-06-30 11:58:22 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-06-30 11:58:22 -0400 |
commit | a00b4e00adeacfbe59b523d46e566186631eab52 (patch) | |
tree | 83949f6e97ecac3c09084b06c943b1fdf33f8873 /web/react/components/mention.jsx | |
parent | ae21685e357416dab708e304fd8d9c005b11278d (diff) | |
parent | 8be4df00b4d30c220d6f0d13734501c8c94e6495 (diff) | |
download | chat-a00b4e00adeacfbe59b523d46e566186631eab52.tar.gz chat-a00b4e00adeacfbe59b523d46e566186631eab52.tar.bz2 chat-a00b4e00adeacfbe59b523d46e566186631eab52.zip |
Merge pull request #106 from mattermost/mm-1119
fixes mm-1119 adds @all and @channel mention capabilites
Diffstat (limited to 'web/react/components/mention.jsx')
-rw-r--r-- | web/react/components/mention.jsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/web/react/components/mention.jsx b/web/react/components/mention.jsx index 86a423138..3c33ddf49 100644 --- a/web/react/components/mention.jsx +++ b/web/react/components/mention.jsx @@ -6,10 +6,16 @@ module.exports = React.createClass({ this.props.handleClick(this.props.username); }, render: function() { + var icon; + if (this.props.id != null) { + icon = <span><img className="mention-img" src={"/api/v1/users/" + this.props.id + "/image"}/></span>; + } else { + icon = <span><i className="mention-img fa fa-users fa-2x"></i></span>; + } return ( <div className="mentions-name" onClick={this.handleClick}> - <img className="mention-img" src={"/api/v1/users/" + this.props.id + "/image"}/> - <span>@{this.props.username}</span><span className="mention-fullname">{this.props.name}</span> + <div className="pull-left">{icon}</div> + <div className="pull-left mention-align"><span>@{this.props.username}</span><span className="mention-fullname">{this.props.secondary_text}</span></div> </div> ); } |