mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-16 08:41:28 +03:00
Combined download stage and download progress columns
This commit is contained in:
@@ -31,25 +31,22 @@
|
|||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<!-- Stage Column -->
|
|
||||||
<ng-container matColumnDef="step_index">
|
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> <ng-container i18n="Stage">Stage</ng-container> </mat-header-cell>
|
|
||||||
<mat-cell *matCellDef="let element">
|
|
||||||
<ng-container *ngIf="!element.error">{{STEP_INDEX_TO_LABEL[element.step_index]}}</ng-container>
|
|
||||||
<ng-container *ngIf="element.error" i18n="Error">Error</ng-container>
|
|
||||||
</mat-cell>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<!-- Progress Column -->
|
<!-- Progress Column -->
|
||||||
<ng-container matColumnDef="percent_complete">
|
<ng-container matColumnDef="percent_complete">
|
||||||
<mat-header-cell *matHeaderCellDef mat-sort-header> <ng-container i18n="Progress">Progress</ng-container> </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef mat-sort-header> <ng-container i18n="Progress">Progress</ng-container> </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let element">
|
<mat-cell *matCellDef="let element">
|
||||||
|
<ng-container *ngIf="!element.error && element.step_index !== 2">
|
||||||
|
{{STEP_INDEX_TO_LABEL[element.step_index]}}
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="!element.error && element.step_index === 2">
|
||||||
<ng-container *ngIf="element.percent_complete">
|
<ng-container *ngIf="element.percent_complete">
|
||||||
{{+(element.percent_complete) > 100 ? '100' : element.percent_complete}}%
|
{{+(element.percent_complete) > 100 ? '100' : element.percent_complete}}%
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="!element.percent_complete">
|
<ng-container *ngIf="!element.percent_complete">
|
||||||
N/A
|
N/A
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="element.error" i18n="Error">Error</ng-container>
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ export class DownloadsComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
actionsFlex = 2;
|
actionsFlex = 2;
|
||||||
displayedColumnsBig: string[] = ['timestamp_start', 'title', 'step_index', 'sub_name', 'percent_complete', 'actions'];
|
displayedColumnsBig: string[] = ['timestamp_start', 'title', 'sub_name', 'percent_complete', 'actions'];
|
||||||
displayedColumnsSmall: string[] = ['title', 'step_index', 'percent_complete', 'actions'];
|
displayedColumnsSmall: string[] = ['title', 'percent_complete', 'actions'];
|
||||||
displayedColumns: string[] = this.displayedColumnsBig;
|
displayedColumns: string[] = this.displayedColumnsBig;
|
||||||
dataSource = null; // new MatTableDataSource<Download>();
|
dataSource = null; // new MatTableDataSource<Download>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user