From 4d84d3d5f343a40998091533fc25db241e9dac77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=20K=C3=A4sler?= <tom.kaesler@mni.thm.de>
Date: Sun, 9 Jun 2019 01:54:04 +0200
Subject: [PATCH] Add badge as comment counter

---
 .../shared/comment-list/comment-list.component.html           | 4 +++-
 .../shared/comment-list/comment-list.component.scss           | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/app/components/shared/comment-list/comment-list.component.html b/src/app/components/shared/comment-list/comment-list.component.html
index 0c9fe5eb0..88fda70b2 100644
--- a/src/app/components/shared/comment-list/comment-list.component.html
+++ b/src/app/components/shared/comment-list/comment-list.component.html
@@ -12,7 +12,9 @@
   <span class="fill-remaining-space"></span>
 
   <div class="button-bar" fxLayoutAlign="center center">
-    <button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && comments && comments.length > 0"
+    <button mat-mini-fab color="primary" class="comment-counter" *ngIf="comments && comments.length > 0">{{comments.length}}</button>
+
+    <button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && comments.length > 0"
             [matMenuTriggerFor]="filterMenu" matTooltip="{{ 'comment-list.filter-comments' | translate }}">
       <mat-icon class="searchBarIcon">filter_list</mat-icon>
     </button>
diff --git a/src/app/components/shared/comment-list/comment-list.component.scss b/src/app/components/shared/comment-list/comment-list.component.scss
index 9e71f823a..76f69bd73 100644
--- a/src/app/components/shared/comment-list/comment-list.component.scss
+++ b/src/app/components/shared/comment-list/comment-list.component.scss
@@ -79,3 +79,7 @@ h4  {
 .unread-icon {
   color: var(--yellow);
 }
+
+.comment-counter {
+  font-size: 18pt;
+}
-- 
GitLab