diff --git a/src/app/components/shared/comment/comment.component.html b/src/app/components/shared/comment/comment.component.html index 9883190bfbb4899063a78e6857db95fe59e1e4a4..777875a0560207e73e1d6499f69de77a47a6c6de 100644 --- a/src/app/components/shared/comment/comment.component.html +++ b/src/app/components/shared/comment/comment.component.html @@ -256,10 +256,11 @@ <div fxLayout="column" fxLayoutAlign="center" - *ngIf="isStudent && !disabled" + *ngIf="isStudent" [ngClass]="{ '1': 'voteUp', '-1': 'voteDown', '0': 'reset'}[currentVote]"> <button mat-icon-button (click)="voteUp(comment)" + *ngIf="!disabled" matTooltip="{{ 'comment-page.vote-up' | translate }}" tabindex="0" attr.aria-labelledby="comment_vote_up{{ comment.id }}"> @@ -270,6 +271,7 @@ <span class="score">{{comment.score}}</span> <button mat-icon-button (click)="voteDown(comment)" + *ngIf="!disabled" matTooltip="{{ 'comment-page.vote-down' | translate }}" tabindex="0" attr.aria-labelledby="comment_vote_down{{ comment.id }}"> diff --git a/src/app/components/shared/header/header.component.ts b/src/app/components/shared/header/header.component.ts index 2ececbff8ce5d4ba62c5c838cfa204b60bf7fe3f..6fad6d354e5f257f625d4e41b0d3653ba000ae6a 100644 --- a/src/app/components/shared/header/header.component.ts +++ b/src/app/components/shared/header/header.component.ts @@ -117,14 +117,14 @@ export class HeaderComponent implements OnInit { if (val instanceof NavigationEnd) { /* segments gets all parts of the url */ const segments = this.router.parseUrl(this.router.url).root.children.primary.segments; + this.shortId = ''; + this.room = null; + if (segments && segments.length > 2) { if (!segments[2].path.includes('%')) { this.shortId = segments[2].path; localStorage.setItem('shortId', this.shortId); this.roomService.getRoomByShortId(this.shortId).subscribe(room => this.room = room); - } else { - this.shortId = ''; - this.room = null; } } } diff --git a/src/app/components/shared/room-list/room-list.component.html b/src/app/components/shared/room-list/room-list.component.html index b7e63704a82237938ae88acfc2cb9bb36301f274..56ffe83f6637c6bd4a03b1a46b387e68ccb97f3c 100644 --- a/src/app/components/shared/room-list/room-list.component.html +++ b/src/app/components/shared/room-list/room-list.component.html @@ -33,7 +33,6 @@ <td mat-cell class="clickable" *matCellDef="let room" (click)="setCurrentRoom(room.shortId)" routerLink="/{{ roleToString((room.role)) }}/room/{{ room.shortId }}"> <span matBadge="{{room.commentCount > 0 ? room.commentCount : null}}" matBadgePosition="before" matBadgeSize="small" matBadgeOverlap="false"> - <mat-icon *ngIf="room.closed" class="warn" [inline]="true">block</mat-icon> »{{room.name}}« </span> </td> @@ -47,6 +46,7 @@ <td mat-cell class="clickable" *matCellDef="let room" (click)="setCurrentRoom(room.shortId)" routerLink="/{{ roleToString((room.role)) }}/room/{{ room.shortId }}"> {{ room.shortId }} + <mat-icon *ngIf="room.closed" class="warn" [inline]="true">block</mat-icon> </td> </ng-container>