Add a download selected button for non-autostarted downloads

This commit is contained in:
lvank
2025-01-12 20:15:23 -06:00
parent d0a2de2acd
commit 1c02883f0e
3 changed files with 13 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ export class AppComponent implements AfterViewInit {
@ViewChild('queueMasterCheckbox') queueMasterCheckbox: MasterCheckboxComponent;
@ViewChild('queueDelSelected') queueDelSelected: ElementRef;
@ViewChild('queueDownloadSelected') queueDownloadSelected: ElementRef;
@ViewChild('doneMasterCheckbox') doneMasterCheckbox: MasterCheckboxComponent;
@ViewChild('doneDelSelected') doneDelSelected: ElementRef;
@ViewChild('doneClearCompleted') doneClearCompleted: ElementRef;
@@ -180,6 +181,7 @@ export class AppComponent implements AfterViewInit {
queueSelectionChanged(checked: number) {
this.queueDelSelected.nativeElement.disabled = checked == 0;
this.queueDownloadSelected.nativeElement.disabled = checked == 0;
}
doneSelectionChanged(checked: number) {
@@ -228,6 +230,10 @@ export class AppComponent implements AfterViewInit {
this.downloads.delById(where, [id]).subscribe();
}
startSelectedDownloads(where: string){
this.downloads.startByFilter(where, dl => dl.checked).subscribe();
}
delSelectedDownloads(where: string) {
this.downloads.delByFilter(where, dl => dl.checked).subscribe();
}