diff --git a/client/src/app/torrent-table/torrent-table.component.html b/client/src/app/torrent-table/torrent-table.component.html index b728bdc..5524fce 100644 --- a/client/src/app/torrent-table/torrent-table.component.html +++ b/client/src/app/torrent-table/torrent-table.component.html @@ -106,20 +106,27 @@
-
diff --git a/client/src/app/torrent-table/torrent-table.component.ts b/client/src/app/torrent-table/torrent-table.component.ts index 3f17925..782b6c5 100644 --- a/client/src/app/torrent-table/torrent-table.component.ts +++ b/client/src/app/torrent-table/torrent-table.component.ts @@ -20,6 +20,7 @@ export class TorrentTableComponent implements OnInit { public isDeleteModalActive: boolean; public deleteError: string; public deleting: boolean; + public selectAll: boolean; public deleteData: boolean; public deleteRdTorrent: boolean; public deleteLocalFiles: boolean; @@ -247,4 +248,15 @@ export class TorrentTableComponent implements OnInit { }, }); } + // Called when "Select All" is toggled + toggleAllOptions() { + this.deleteData = this.selectAll; + this.deleteRdTorrent = this.selectAll; + this.deleteLocalFiles = this.selectAll; + } + + // Called when any individual checkbox is toggled + updateSelectAll() { + this.selectAll = this.deleteData && this.deleteRdTorrent && this.deleteLocalFiles; + } }