From e1bebb2d776b12d6e1461e06f318e79fcb93ea2c Mon Sep 17 00:00:00 2001 From: samogot Date: Sat, 28 May 2016 02:31:02 +0300 Subject: 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 "/" replacing fix empty post without additional content body * discard buggy "simplification" --- webapp/components/youtube_video.jsx | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'webapp/components/youtube_video.jsx') diff --git a/webapp/components/youtube_video.jsx b/webapp/components/youtube_video.jsx index dc2d368d7..42b193612 100644 --- a/webapp/components/youtube_video.jsx +++ b/webapp/components/youtube_video.jsx @@ -144,9 +144,22 @@ export default class YoutubeVideo extends React.Component { return
; } - let header = 'Youtube'; + let header; if (this.state.title) { - header = header + ' - '; + header = ( +

+ {'Youtube - '} + + + {this.state.title} + + +

+ ); } let content; @@ -190,18 +203,7 @@ export default class YoutubeVideo extends React.Component { return (
-

- {header} - - - {this.state.title} - - -

+ {header}