mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge pull request #211 from rgarmsen2295/mm-1186
MM-1186 Adds channel name to RHS comment threads
This commit is contained in:
@@ -68,6 +68,7 @@ RootPost = React.createClass({
|
||||
var filenames = this.props.post.filenames;
|
||||
var isOwner = UserStore.getCurrentId() == this.props.post.user_id;
|
||||
var timestamp = UserStore.getProfile(this.props.post.user_id).update_at;
|
||||
var channel = ChannelStore.get(this.props.post.channel_id);
|
||||
|
||||
var type = "Post";
|
||||
if (this.props.post.root_id.length > 0) {
|
||||
@@ -79,6 +80,10 @@ RootPost = React.createClass({
|
||||
currentUserCss = "current--user";
|
||||
}
|
||||
|
||||
if (channel) {
|
||||
channelName = (channel.type === 'D') ? "Private Message" : channel.display_name;
|
||||
}
|
||||
|
||||
if (filenames) {
|
||||
var postFiles = [];
|
||||
var images = [];
|
||||
@@ -118,6 +123,7 @@ RootPost = React.createClass({
|
||||
|
||||
return (
|
||||
<div className={"post post--root " + currentUserCss}>
|
||||
<div className="post-right-channel__name">{ channelName }</div>
|
||||
<div className="post-profile-img__container">
|
||||
<img className="post-profile-img" src={"/api/v1/users/" + this.props.post.user_id + "/image?time=" + timestamp} height="36" width="36" />
|
||||
</div>
|
||||
|
||||
@@ -77,7 +77,7 @@ var SearchItem = React.createClass({
|
||||
|
||||
var message = utils.textToJsx(this.props.post.message, {searchTerm: this.props.term, noMentionHighlight: !this.props.isMentionSearch});
|
||||
var channelName = "";
|
||||
var channel = ChannelStore.get(this.props.post.channel_id)
|
||||
var channel = ChannelStore.get(this.props.post.channel_id);
|
||||
var timestamp = UserStore.getCurrentUser().update_at;
|
||||
|
||||
if (channel) {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
.post {
|
||||
&.post--root {
|
||||
padding: 1em 1em 0;
|
||||
padding: 0 1em 0;
|
||||
margin: 1em 0;
|
||||
hr {
|
||||
border-color: #DDD;
|
||||
@@ -62,6 +62,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.post-right-channel__name {
|
||||
font-weight: 600;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.post-right-root-container li {
|
||||
display: inline;
|
||||
list-style-type: none;
|
||||
|
||||
Reference in New Issue
Block a user