Skip to content
Snippets Groups Projects
Commit 3d6d9b95 authored by Anris Ceta's avatar Anris Ceta :speech_balloon:
Browse files

fix style

parent 79052646
Branches
Tags
4 merge requests!171SWTP Comment Project,!170Fix linter in pipe,!169WebSocket Connector,!168Filter comment list
...@@ -2,9 +2,12 @@ ...@@ -2,9 +2,12 @@
<div fxLayout="row" fxLayoutAlign="center center"> <div fxLayout="row" fxLayoutAlign="center center">
<mat-card-title>{{comment.subject}}</mat-card-title> <mat-card-title>{{comment.subject}}</mat-card-title>
<span class="fill-remaining-space"></span> <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> <mat-icon [ngClass]="{'correct-icon' : comment.correct === true}">check_circle</mat-icon>
</button> </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> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>
<mat-card-content> <mat-card-content>
......
...@@ -19,8 +19,8 @@ mat-toolbar { ...@@ -19,8 +19,8 @@ mat-toolbar {
border-radius: 2px; border-radius: 2px;
} }
.outer-card { .card-container :hover {
border-radius: 8px; cursor: pointer;
} }
mat-icon { mat-icon {
...@@ -35,6 +35,10 @@ mat-icon { ...@@ -35,6 +35,10 @@ mat-icon {
color: green; color: green;
} }
.read-icon {
color: blue;
}
mat-card-title { mat-card-title {
margin: 0px; margin: 0px;
} }
...@@ -37,6 +37,7 @@ export class CommentComponent implements OnInit { ...@@ -37,6 +37,7 @@ export class CommentComponent implements OnInit {
} }
setRead(comment: Comment): void { setRead(comment: Comment): void {
comment.read = !comment.read;
this.commentService.updateComment(comment).subscribe(); this.commentService.updateComment(comment).subscribe();
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment