diff options
author | samogot <samogot@gmail.com> | 2016-05-28 02:31:02 +0300 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-05-27 19:31:02 -0400 |
commit | e1bebb2d776b12d6e1461e06f318e79fcb93ea2c (patch) | |
tree | 9cac8e57867a3b16589162f620f991c0ea6ea94d /webapp/components/rhs_root_post.jsx | |
parent | c7615920df6b25d0e8d59e0aaf00d2f772ef55e4 (diff) | |
download | chat-e1bebb2d776b12d6e1461e06f318e79fcb93ea2c.tar.gz chat-e1bebb2d776b12d6e1461e06f318e79fcb93ea2c.tar.bz2 chat-e1bebb2d776b12d6e1461e06f318e79fcb93ea2c.zip |
PLT-2321 Move the toggle icon next to the link being previewed (#3071)
* PLT-2321 Move the toggle icon next to the link being previewed
only applicable to one-line messages started with link
* remove useless "Youtube" header when no title is available
* allow breaking long links instead of toggle
* simplify "/" to "/<wbr />" replacing
fix empty post without additional content body
* discard buggy "simplification"
Diffstat (limited to 'webapp/components/rhs_root_post.jsx')
-rw-r--r-- | webapp/components/rhs_root_post.jsx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/webapp/components/rhs_root_post.jsx b/webapp/components/rhs_root_post.jsx index 051d68f34..e6edcb86a 100644 --- a/webapp/components/rhs_root_post.jsx +++ b/webapp/components/rhs_root_post.jsx @@ -210,6 +210,14 @@ export default class RhsRootPost extends React.Component { /> ); + const messageWrapper = ( + <div + ref='message_holder' + onClick={TextFormatting.handleClick} + dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}} + /> + ); + return ( <div className={'post post--root ' + userCss + ' ' + systemMessageClass}> <div className='post-right-channel__name'>{channelName}</div> @@ -241,13 +249,9 @@ export default class RhsRootPost extends React.Component { </li> </ul> <div className='post__body'> - <div - ref='message_holder' - onClick={TextFormatting.handleClick} - dangerouslySetInnerHTML={{__html: TextFormatting.formatText(post.message)}} - /> <PostBodyAdditionalContent post={post} + message={messageWrapper} /> {fileAttachment} </div> |