From 56861e8d01de2c0251d3ca63af0dfc70c822b02e Mon Sep 17 00:00:00 2001 From: elhombretecla Date: Wed, 25 Nov 2020 14:53:58 +0100 Subject: [PATCH] :tada: Create placeholder at comments sidebar --- .../styles/main/partials/comments.scss | 34 +++++++++---------- .../src/app/main/ui/workspace/comments.cljs | 8 +++-- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/frontend/resources/styles/main/partials/comments.scss b/frontend/resources/styles/main/partials/comments.scss index 8c903dfad..161c109bb 100644 --- a/frontend/resources/styles/main/partials/comments.scss +++ b/frontend/resources/styles/main/partials/comments.scss @@ -423,28 +423,12 @@ } } - .thread-groups-placeholder { - align-items: center; - display: flex; - flex-direction: column; - font-size: $fs14; - padding: $big; - text-align: center; - - svg { - fill: $color-gray-20; - height: 24px; - margin-bottom: $small; - width: 24px; - } - } - .thread-group { .section-title { color: $color-black; } } - + .comment { .author .name .fullname { color: $color-gray-40; @@ -455,3 +439,19 @@ } } +.thread-groups-placeholder { + align-items: center; + display: flex; + flex-direction: column; + font-size: $fs12; + padding: $big; + text-align: center; + + svg { + fill: $color-gray-20; + height: 24px; + margin-bottom: $big; + width: 24px; + } +} + diff --git a/frontend/src/app/main/ui/workspace/comments.cljs b/frontend/src/app/main/ui/workspace/comments.cljs index f7cc52b52..8475ab4d2 100644 --- a/frontend/src/app/main/ui/workspace/comments.cljs +++ b/frontend/src/app/main/ui/workspace/comments.cljs @@ -166,7 +166,7 @@ :on-close #(reset! options? false)} [:& sidebar-options {:local local}]]] - (when (seq tgroups) + (if (seq tgroups) [:div.thread-groups [:& cmt/comment-thread-group {:group (first tgroups) @@ -179,6 +179,10 @@ {:group tgroup :on-thread-click on-thread-click :users users - :key (:page-id tgroup)}]])])])) + :key (:page-id tgroup)}]])] + + [:div.thread-groups-placeholder + i/chat + (tr "labels.no-comments-available")])]))