diff options
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/post_view/components/post_info.jsx | 35 | ||||
-rw-r--r-- | webapp/components/rhs_comment.jsx | 35 |
2 files changed, 42 insertions, 28 deletions
diff --git a/webapp/components/post_view/components/post_info.jsx b/webapp/components/post_view/components/post_info.jsx index d48d97ba1..e95afe3ed 100644 --- a/webapp/components/post_view/components/post_info.jsx +++ b/webapp/components/post_view/components/post_info.jsx @@ -336,6 +336,26 @@ export default class PostInfo extends React.Component { flagFunc = this.flagPost; } + let flagTrigger; + if (!Utils.isPostEphemeral(post)) { + flagTrigger = ( + <OverlayTrigger + key={'flagtooltipkey' + flagVisible} + delayShow={Constants.OVERLAY_TIME_DELAY} + placement='top' + overlay={flagTooltip} + > + <a + href='#' + className={'flag-icon__container ' + flagVisible} + onClick={flagFunc} + > + {flag} + </a> + </OverlayTrigger> + ); + } + return ( <ul className='post__header--info'> <li className='col'> @@ -345,20 +365,7 @@ export default class PostInfo extends React.Component { compactDisplay={this.props.compactDisplay} useMilitaryTime={this.props.useMilitaryTime} /> - <OverlayTrigger - key={'flagtooltipkey' + flagVisible} - delayShow={Constants.OVERLAY_TIME_DELAY} - placement='top' - overlay={flagTooltip} - > - <a - href='#' - className={'flag-icon__container ' + flagVisible} - onClick={flagFunc} - > - {flag} - </a> - </OverlayTrigger> + {flagTrigger} </li> {options} </ul> diff --git a/webapp/components/rhs_comment.jsx b/webapp/components/rhs_comment.jsx index 92182e27a..05df1ac5f 100644 --- a/webapp/components/rhs_comment.jsx +++ b/webapp/components/rhs_comment.jsx @@ -330,6 +330,26 @@ export default class RhsComment extends React.Component { flagFunc = this.flagPost; } + let flagTrigger; + if (!Utils.isPostEphemeral(post)) { + flagTrigger = ( + <OverlayTrigger + key={'commentflagtooltipkey' + flagVisible} + delayShow={Constants.OVERLAY_TIME_DELAY} + placement='top' + overlay={flagTooltip} + > + <a + href='#' + className={'flag-icon__container ' + flagVisible} + onClick={flagFunc} + > + {flag} + </a> + </OverlayTrigger> + ); + } + return ( <div className={'post post--thread ' + currentUserCss + ' ' + compactClass}> <div className='post__content'> @@ -352,20 +372,7 @@ export default class RhsComment extends React.Component { minute='2-digit' /> </time> - <OverlayTrigger - key={'commentflagtooltipkey' + flagVisible} - delayShow={Constants.OVERLAY_TIME_DELAY} - placement='top' - overlay={flagTooltip} - > - <a - href='#' - className={'flag-icon__container ' + flagVisible} - onClick={flagFunc} - > - {flag} - </a> - </OverlayTrigger> + {flagTrigger} </li> <li className='col col__reply'> {dropdown} |