From 3d6d9b95b2e4b36df07cc238e28c00c26841b70f Mon Sep 17 00:00:00 2001
From: Anris Ceta <anris.ceta@mni.thm.de>
Date: Mon, 18 Mar 2019 15:41:06 +0100
Subject: [PATCH] fix style

---
 src/app/components/shared/comment/comment.component.html | 5 ++++-
 src/app/components/shared/comment/comment.component.scss | 8 ++++++--
 src/app/components/shared/comment/comment.component.ts   | 1 +
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/app/components/shared/comment/comment.component.html b/src/app/components/shared/comment/comment.component.html
index 5293d2f65..b694fb287 100644
--- a/src/app/components/shared/comment/comment.component.html
+++ b/src/app/components/shared/comment/comment.component.html
@@ -2,9 +2,12 @@
   <div fxLayout="row" fxLayoutAlign="center center">
     <mat-card-title>{{comment.subject}}</mat-card-title>
     <span class="fill-remaining-space"></span>
-    <button mat-icon-button [disabled]="userRole === 0" (click)="setCorrect(comment)" [matTooltip]="comment.correct ? 'Anwort richtig' : null">
+    <button mat-icon-button [disabled]="userRole === 0" (click)="setCorrect(comment)" [matTooltip]="comment.correct ? 'Antwort richtig' : null">
       <mat-icon [ngClass]="{'correct-icon' : comment.correct === true}">check_circle</mat-icon>
     </button>
+    <button mat-icon-button [disabled]="userRole === 0" (click)="setRead(comment)" [matTooltip]="comment.read ? 'mark me as unread' : 'mark me as read'">
+      <mat-icon [ngClass]="{'read-icon' : comment.read === true}">visibility</mat-icon>
+    </button>
   </div>
   <mat-divider></mat-divider>
   <mat-card-content>
diff --git a/src/app/components/shared/comment/comment.component.scss b/src/app/components/shared/comment/comment.component.scss
index 52e87c8f4..f0cb6ab73 100644
--- a/src/app/components/shared/comment/comment.component.scss
+++ b/src/app/components/shared/comment/comment.component.scss
@@ -19,8 +19,8 @@ mat-toolbar {
   border-radius: 2px;
 }
 
-.outer-card {
-  border-radius: 8px;
+.card-container :hover {
+  cursor: pointer;
 }
 
 mat-icon {
@@ -35,6 +35,10 @@ mat-icon {
   color: green;
 }
 
+.read-icon {
+  color: blue;
+}
+
 mat-card-title {
   margin: 0px;
 }
diff --git a/src/app/components/shared/comment/comment.component.ts b/src/app/components/shared/comment/comment.component.ts
index dbbff9b61..ad2808dd3 100644
--- a/src/app/components/shared/comment/comment.component.ts
+++ b/src/app/components/shared/comment/comment.component.ts
@@ -37,6 +37,7 @@ export class CommentComponent implements OnInit {
   }
 
   setRead(comment: Comment): void {
+    comment.read = !comment.read;
     this.commentService.updateComment(comment).subscribe();
   }
 
-- 
GitLab