refine list
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
<div class="page-container mat-elevation-z8">
|
||||
<div
|
||||
class="page-container mat-elevation-z8"
|
||||
[class.pinned]="selectedSongId !== 0"
|
||||
>
|
||||
<div class="table-container">
|
||||
<table
|
||||
*ngIf="songs"
|
||||
mat-table
|
||||
[dataSource]="songs"
|
||||
[dataSource]="songsService.songs | async"
|
||||
class="mat-elevation-z8"
|
||||
>
|
||||
<ng-container matColumnDef="Number">
|
||||
@@ -18,25 +20,37 @@
|
||||
|
||||
<ng-container matColumnDef="Key">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.Key }}</td>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mat-chip-list *ngIf="element.Key">
|
||||
<mat-chip>{{ element.Key }}</mat-chip>
|
||||
</mat-chip-list>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="SongType">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.SongType }}</td>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mat-chip-list *ngIf="element.SongType && element.SongType!=='None'">
|
||||
<mat-chip [style.background-color]="renderSongType(element.SongType).color">{{ renderSongType(element.SongType).name }}</mat-chip>
|
||||
</mat-chip-list>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="Tempo">
|
||||
<th mat-header-cell *matHeaderCellDef></th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.Tempo }}</td>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mat-chip-list *ngIf="element.Tempo">
|
||||
<mat-chip>{{ element.Tempo }}</mat-chip>
|
||||
</mat-chip-list>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="columns; sticky: true"></tr>
|
||||
<tr
|
||||
[class.selected]="selectedSongId === row.ID"
|
||||
mat-row
|
||||
*matRowDef="let row; columns: columns"
|
||||
[routerLink]="['/songs', row.ID]"
|
||||
routerLinkActive="router-link-active"
|
||||
(click)="onClick(row.ID)"
|
||||
></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user