From 6f67f386007c6b6aed37c1e06cf21c5db9490fa0 Mon Sep 17 00:00:00 2001 From: Eugene Kallivrousis Date: Tue, 8 Apr 2025 15:20:56 -0400 Subject: [PATCH 1/6] Adding a select all button for the delete torrent popup --- .../torrent-table/torrent-table.component.html | 15 +++++++++++---- .../app/torrent-table/torrent-table.component.ts | 12 ++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) 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; + } } From 953e208b18e72369c4ba77bfae9dfa89529ab39d Mon Sep 17 00:00:00 2001 From: Cucumberrbob <128094686+Cucumberrbob@users.noreply.github.com> Date: Tue, 8 Apr 2025 20:49:06 +0100 Subject: [PATCH 2/6] run prettier --- client/src/app/torrent-table/torrent-table.component.html | 2 +- client/src/app/torrent-table/torrent-table.component.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/app/torrent-table/torrent-table.component.html b/client/src/app/torrent-table/torrent-table.component.html index 5524fce..fe243e1 100644 --- a/client/src/app/torrent-table/torrent-table.component.html +++ b/client/src/app/torrent-table/torrent-table.component.html @@ -106,7 +106,7 @@
-

-