summaryrefslogtreecommitdiffstats
path: root/web/react/components/mention.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-07-05 09:02:23 -0800
committer=Corey Hulen <corey@hulen.com>2015-07-05 09:02:23 -0800
commit592d68cf4134b668e3ff962d17f8aa75b1bc055f (patch)
tree6e743b07487caf5fe350439aefdf0355a7e80d9b /web/react/components/mention.jsx
parent72bfc1ee2afd2fa4a34186b62f144f8f6c50d693 (diff)
parent4a3003c0dcf7d642f233493e32b07beed5d08327 (diff)
downloadchat-592d68cf4134b668e3ff962d17f8aa75b1bc055f.tar.gz
chat-592d68cf4134b668e3ff962d17f8aa75b1bc055f.tar.bz2
chat-592d68cf4134b668e3ff962d17f8aa75b1bc055f.zip
Merge branch 'master' into mm-1391
Diffstat (limited to 'web/react/components/mention.jsx')
-rw-r--r--web/react/components/mention.jsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/web/react/components/mention.jsx b/web/react/components/mention.jsx
index ba758688b..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="pull-left mention-img" src={"/api/v1/users/" + this.props.id + "/image"}/>
- <span>@{this.props.username}</span><span style={{'color':'grey', 'marginLeft':'10px'}}>{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>
);
}