From 7d907285356628a6c9478ee655a333fb191cdb5d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 31 May 2019 15:19:11 +0300 Subject: Thread styling --- vnext/src/ui/Thread.js | 62 ++++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 27 deletions(-) (limited to 'vnext/src/ui/Thread.js') diff --git a/vnext/src/ui/Thread.js b/vnext/src/ui/Thread.js index e7ccb032..b625ecad 100644 --- a/vnext/src/ui/Thread.js +++ b/vnext/src/ui/Thread.js @@ -14,6 +14,8 @@ import { format, embedUrls } from '../utils/embed'; import { getMessages, comment, markReadTracker } from '../api'; +import './Thread.css'; + function Comment({ msg, visitor, active, setActive, postComment }) { const embedRef = useRef(); const msgRef = useRef(); @@ -26,8 +28,8 @@ function Comment({ msg, visitor, active, setActive, postComment }) { } }, []); return ( -
-
+
+
{msg.replyto > 0 && @@ -36,35 +38,41 @@ function Comment({ msg, visitor, active, setActive, postComment }) { )}
+
+ { + visitor.uid > 0 ? ( + <> + {active === msg.rid || setActive(msg.rid)}>Reply} + + ) : ( + <> +  · {active === msg.rid || } + + ) + } +
- { - msg.html ?
- : -
-

= 0) }} /> +

+ { + msg.html ?
+ : +
+

= 0) }} /> +

+ } +
+ { + msg.photo && + - } - { - msg.photo && -
- - - -
- } + }
{ - visitor.uid > 0 ? ( - <> - {active === msg.rid || setActive(msg.rid)}>Reply} - {active === msg.rid && Write a comment...} - - ) : ( - <> -  · {active === msg.rid || } - - ) + active === msg.rid && Write a comment... }
@@ -154,7 +162,7 @@ export default function Thread(props) {
    { !loading ? replies.map((msg) => ( -
  • +
  • )) : ( -- cgit v1.2.3