mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 22:29:38 +00:00
Add "Upload Date" column
This commit is contained in:
@@ -11,3 +11,4 @@
|
||||
<td *ngIf="hasColumn('charter')">{{ song[0].charter || 'Various' }}</td>
|
||||
<td *ngIf="hasColumn('length')">{{ songLength }}</td>
|
||||
<td *ngIf="hasColumn('difficulty')">{{ songDifficulty }}</td>
|
||||
<td *ngIf="hasColumn('uploaded')" class="text-nowrap">{{ uploaded | date: 'yyyy-MM-dd' }}</td>
|
||||
|
||||
@@ -54,6 +54,10 @@ export class ResultTableRowComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
get uploaded() {
|
||||
return this.song[0].modifiedTime
|
||||
}
|
||||
|
||||
get selected() {
|
||||
return this.selectionService.selections[this.groupId] ?? false
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
Length (min) <i *ngIf="sortColumn === 'length'" class="bi bi-caret-{{ sortDirection === 'asc' ? 'down' : 'up' }}-fill"></i>
|
||||
</th>
|
||||
<th *ngIf="hasColumn('difficulty')" [ngClass]="sortDirection" class="cursor-pointer">Difficulty</th>
|
||||
<th *ngIf="hasColumn('uploaded')" [ngClass]="sortDirection" class="cursor-pointer" (click)="onColClicked('modifiedTime')">
|
||||
Upload Date <i *ngIf="sortColumn === 'modifiedTime'" class="bi bi-caret-{{ sortDirection === 'asc' ? 'down' : 'up' }}-fill"></i>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -22,7 +22,7 @@ export class ResultTableComponent implements OnInit {
|
||||
|
||||
activeSong: ChartData[] | null = null
|
||||
sortDirection: 'asc' | 'desc' = 'asc'
|
||||
sortColumn: 'name' | 'artist' | 'album' | 'genre' | 'year' | 'charter' | 'length' | null = null
|
||||
sortColumn: 'name' | 'artist' | 'album' | 'genre' | 'year' | 'charter' | 'length' | 'modifiedTime' | null = null
|
||||
|
||||
constructor(
|
||||
public searchService: SearchService,
|
||||
@@ -57,7 +57,7 @@ export class ResultTableComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
onColClicked(column: 'name' | 'artist' | 'album' | 'genre' | 'year' | 'charter' | 'length') {
|
||||
onColClicked(column: 'name' | 'artist' | 'album' | 'genre' | 'year' | 'charter' | 'length' | 'modifiedTime') {
|
||||
if (this.songs.length === 0) { return }
|
||||
if (this.sortColumn !== column) {
|
||||
this.sortColumn = column
|
||||
|
||||
Reference in New Issue
Block a user