summaryrefslogtreecommitdiffstats
path: root/webapp/components/search_results_item.jsx
diff options
context:
space:
mode:
authorAsaad Mahmood <asaadmahmood@users.noreply.github.com>2016-08-16 23:54:11 +0500
committerChristopher Speller <crspeller@gmail.com>2016-08-16 14:54:11 -0400
commit4ef5c1bfb335e41e06e6fb0f0d9d99838ea064e6 (patch)
tree9be91cea46b754faaecf6f917c81c3981bba77ee /webapp/components/search_results_item.jsx
parentccf9778520e2c0331f1836fb5232680f985a6889 (diff)
downloadchat-4ef5c1bfb335e41e06e6fb0f0d9d99838ea064e6.tar.gz
chat-4ef5c1bfb335e41e06e6fb0f0d9d99838ea064e6.tar.bz2
chat-4ef5c1bfb335e41e06e6fb0f0d9d99838ea064e6.zip
Multiple UI Improvements (#3804)
* PLT-3834 - Updating Manage members modal for mobile * PLT-3792 - Making compact view compatible with search and flagged posts RHS * PLT-3910 - Improving suggestions separator * PLT-3769 - Enabling markdown headings in compact view * Updating view members text in en..json * Removing shouldcomponentupdate from search_results_item.jsx
Diffstat (limited to 'webapp/components/search_results_item.jsx')
-rw-r--r--webapp/components/search_results_item.jsx26
1 files changed, 18 insertions, 8 deletions
diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index db64463a9..65abc516e 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -94,6 +94,21 @@ export default class SearchResultsItem extends React.Component {
botIndicator = <li className='bot-indicator'>{Constants.BOT_NAME}</li>;
}
+ let profilePic = (
+ <img
+ src={PostUtils.getProfilePicSrcForPost(post, timestamp)}
+ height='36'
+ width='36'
+ />
+ );
+
+ let compactClass = '';
+ let profilePicContainer = (<div className='post__img'>{profilePic}</div>);
+ if (this.props.compactDisplay) {
+ compactClass = 'post--compact';
+ profilePicContainer = '';
+ }
+
let flag;
let flagVisible = '';
let flagTooltip = (
@@ -148,17 +163,11 @@ export default class SearchResultsItem extends React.Component {
</div>
</div>
<div
- className='post'
+ className={'post post--thread ' + compactClass}
>
<div className='search-channel__name'>{channelName}</div>
<div className='post__content'>
- <div className='post__img'>
- <img
- src={PostUtils.getProfilePicSrcForPost(post, timestamp)}
- height='36'
- width='36'
- />
- </div>
+ {profilePicContainer}
<div>
<ul className='post__header'>
<li className='col col__name'><strong>
@@ -245,6 +254,7 @@ SearchResultsItem.propTypes = {
post: React.PropTypes.object,
user: React.PropTypes.object,
channel: React.PropTypes.object,
+ compactDisplay: React.PropTypes.bool,
isMentionSearch: React.PropTypes.bool,
term: React.PropTypes.string,
useMilitaryTime: React.PropTypes.bool.isRequired,