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 cf32c8a6609dd8748f39047ab79fa18aae82c3e7..65fb047c746b3c747518fbc8024f118b2dd07440 100644 --- a/src/app/components/shared/comment-list/comment-list.component.html +++ b/src/app/components/shared/comment-list/comment-list.component.html @@ -35,15 +35,15 @@ <mat-menu #sortMenu="matMenu" xPosition="before"> <button mat-icon-button (focus)="hideCommentsList=false" (click)="sortComments(votedesc)"> - <mat-icon>arrow_upwards</mat-icon> + <mat-icon [ngClass]="{votedesc: 'up'}[currentSort]">keyboard_arrow_up</mat-icon> </button> <button mat-icon-button (focus)="hideCommentsList=false" (click)="sortComments(voteasc)"> - <mat-icon>arrow_downwards</mat-icon> + <mat-icon [ngClass]="{voteasc: 'down'}[currentSort]">keyboard_arrow_down</mat-icon> </button> - <button mat-icon-button (focus)="hideCommentsList=false" (click)="sortComments(currentSort === timedesc ? timeasc : timedesc)"> - <mat-icon>access_time</mat-icon> + <button mat-icon-button (focus)="hideCommentsList=false" (click)="sortComments(time)"> + <mat-icon [ngClass]="{time: 'unread-icon'}[currentSort]">access_time</mat-icon> </button> </mat-menu> 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 76f69bd736429644388874d9a10e262fba38b4b8..1c6e49a66c0a04a07699ef1430450ff385109a92 100644 --- a/src/app/components/shared/comment-list/comment-list.component.scss +++ b/src/app/components/shared/comment-list/comment-list.component.scss @@ -83,3 +83,11 @@ h4 { .comment-counter { font-size: 18pt; } + +.up { + color: var(--green); +} + +.down { + color: var(--red); +} diff --git a/src/app/components/shared/comment-list/comment-list.component.ts b/src/app/components/shared/comment-list/comment-list.component.ts index dae81293fac8310a2d82d2e7f253fe17e77b9be6..4ff0c457992334f5dbbc2eb8f9b11d81190df5eb 100644 --- a/src/app/components/shared/comment-list/comment-list.component.ts +++ b/src/app/components/shared/comment-list/comment-list.component.ts @@ -29,10 +29,9 @@ export class CommentListComponent implements OnInit { userRole: UserRole; deviceType: string; isLoading = true; - voteasc = 'vote_asc'; - votedesc = 'vote_desc'; - timeasc = 'time_asc'; - timedesc = 'time_desc'; + voteasc = 'voteasc'; + votedesc = 'votedesc'; + time = 'time'; currentSort = this.votedesc; read = 'read'; unread = 'unread'; @@ -205,9 +204,7 @@ export class CommentListComponent implements OnInit { return b.score - a.score; } const dateA = new Date(a.timestamp), dateB = new Date(b.timestamp); - if (type === this.timedesc) { - return +dateA - +dateB; - } else { + if (type === this.time) { return +dateB - +dateA; } }); diff --git a/src/app/components/shared/footer/footer.component.html b/src/app/components/shared/footer/footer.component.html index 7ef949f0636e74f3d031d6c5437e84643e9de920..cafb724a69f15a5bb9c6e2874e9da844551160a9 100644 --- a/src/app/components/shared/footer/footer.component.html +++ b/src/app/components/shared/footer/footer.component.html @@ -5,7 +5,7 @@ Blog </button> <button mat-button *ngIf="router.url === '/home'" (click)="navToDemoSession()"> - <mat-icon>meeting_room</mat-icon> + <mat-icon>launch</mat-icon> Demo </button> <span class="fill-remaining-space"></span>