Hiding titles of filter categories when no filter exists

This commit is contained in:
Zoe Roux 2020-09-21 00:50:26 +02:00
parent 64c9921dca
commit c83d80ab51

View File

@ -13,26 +13,30 @@
</div>
<mat-menu #filterMenu="matMenu" class="big-panel">
<h4><b>Genres</b></h4>
<mat-chip-list>
<!--suppress AngularInvalidExpressionResultType ('default' color is valid for mat-chip)-->
<mat-chip *ngFor="let genre of this.genres"
[color]="this.filters.genres.includes(genre) ? 'accent' : 'default'" selected
(click)="this.addFilter('genres', genre)">
{{genre.name}}
</mat-chip>
</mat-chip-list>
<ng-container *ngIf="this.genres.length > 0">
<h4><b>Genres</b></h4>
<mat-chip-list>
<!--suppress AngularInvalidExpressionResultType ('default' color is valid for mat-chip)-->
<mat-chip *ngFor="let genre of this.genres"
[color]="this.filters.genres.includes(genre) ? 'accent' : 'default'" selected
(click)="this.addFilter('genres', genre)">
{{genre.name}}
</mat-chip>
</mat-chip-list>
</ng-container>
<br/>
<h4><b>Studios</b></h4>
<mat-chip-list>
<!--suppress AngularInvalidExpressionResultType ('default' color is valid for mat-chip)-->
<mat-chip *ngFor="let studio of this.studios"
[color]="this.filters.studio == studio ? 'accent' : 'default'" selected
(click)="this.addFilter('studio', studio, false)">
{{studio.name}}
</mat-chip>
</mat-chip-list>
<ng-container *ngIf="this.studios.length > 0">
<br/>
<h4><b>Studios</b></h4>
<mat-chip-list>
<!--suppress AngularInvalidExpressionResultType ('default' color is valid for mat-chip)-->
<mat-chip *ngFor="let studio of this.studios"
[color]="this.filters.studio == studio ? 'accent' : 'default'" selected
(click)="this.addFilter('studio', studio, false)">
{{studio.name}}
</mat-chip>
</mat-chip-list>
</ng-container>
</mat-menu>
<mat-menu #sortMenu="matMenu">