From 81509dfb6554f3cf5679a6dd560b37c54bc77a2c Mon Sep 17 00:00:00 2001 From: skomerko <168652295+skomerko@users.noreply.github.com> Date: Sat, 12 Oct 2024 07:40:18 +0200 Subject: [PATCH] WebUI: Improve filter lists This PR adds following improvements: * Remove unused tracker entries while processing sync data * Take into account filter selection & terms when performing 'Start/stop/delete' context actions in filter lists Now, only filtered torrents will be affected by them, just like in the GUI. * Provide better feedback when performing 'Start/stop/delete' context actions in filter lists Small improvement over GUI - now these actions will be disabled if it's not possible to use them. * Add context menu to status filter list * Fix error when toggling filter title Fixup for small bug introduced in https://github.com/qbittorrent/qBittorrent/pull/21269 PR #21438. --- src/webui/www/private/css/style.css | 7 +- src/webui/www/private/index.html | 29 +- src/webui/www/private/scripts/client.js | 21 +- src/webui/www/private/scripts/contextmenu.js | 45 ++- src/webui/www/private/scripts/dynamicTable.js | 13 +- src/webui/www/private/scripts/mocha-init.js | 364 +++++------------- .../www/private/views/confirmdeletion.html | 12 +- src/webui/www/private/views/filters.html | 111 ++++-- src/webui/www/private/views/transferlist.html | 2 +- 9 files changed, 259 insertions(+), 345 deletions(-) diff --git a/src/webui/www/private/css/style.css b/src/webui/www/private/css/style.css index d140ad1bc..2c65c4aa2 100644 --- a/src/webui/www/private/css/style.css +++ b/src/webui/www/private/css/style.css @@ -275,6 +275,10 @@ a.propButton img { border-top: 1px solid var(--color-border-default); } +.contextMenu .separatorBottom { + border-bottom: 1px solid var(--color-border-default); +} + .contextMenu li { margin: 0; padding: 0; @@ -284,8 +288,7 @@ a.propButton img { .contextMenu li.disabled { background-color: transparent; cursor: default; - filter: grayscale(1); - opacity: 0.6; + opacity: 0.5; } .contextMenu li.disabled a { diff --git a/src/webui/www/private/index.html b/src/webui/www/private/index.html index 86e92eb51..46e55dda8 100644 --- a/src/webui/www/private/index.html +++ b/src/webui/www/private/index.html @@ -209,29 +209,34 @@ QBT_TR(Export .torrent)QBT_TR[CONTEXT=TransferListWidget] QBT_TR(Export .torrent)QBT_TR[CONTEXT=TransferListWidget] +