Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI: Improve torrent deletion #21289

Merged

Conversation

skomerko
Copy link
Contributor

@skomerko skomerko commented Sep 2, 2024

  • Added 'Confirm when deleting torrents' option to the WebUI
  • Confirm deletion dialog now uses MUI.Modal

Closes #18345.


Everything should work like in GUI, so:

Confirm OFF:

  1. When deleting selected torrents:
    DEL / context menu: torrents deleted, files untouched
    Shift + DEL: both deleted

  2. When deleting by Category/Tag/Tracker:
    Torrents deleted, files untouched

Confirm ON:
Should work like before, no changes there.

MochaUI.centerWindow(w);
}
});
if (LocalPreferences.get("confirm_torrent_deletion", "true") === "true") {
Copy link
Contributor Author

@skomerko skomerko Sep 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was necessary to pretty much copy and paste it multiple times here and below in order to make confirm option work in all cases and to keep existing code intact. Currently, WebUI does not properly take into account selected filters (and filter terms) when performing "Start/stop/remove torrents" context menu actions. I'm going to improve this behavior in another PR and most of the repeated code from here will be gone. I just wanted to do things in proper order.

@xavier2k6 xavier2k6 added the WebUI WebUI-related issues/changes label Sep 2, 2024
@glassez glassez changed the title WebUI: Torrent deletion improvements WebUI: Improve torrent deletion Sep 2, 2024
@skomerko skomerko force-pushed the webui-torrent-deletion-improvements branch from eb30884 to 8dfe1a8 Compare September 3, 2024 06:52
@Chocobo1 Chocobo1 requested a review from a team September 6, 2024 08:25
@skomerko skomerko force-pushed the webui-torrent-deletion-improvements branch from 8dfe1a8 to efc4e4e Compare September 6, 2024 11:54
@skomerko skomerko force-pushed the webui-torrent-deletion-improvements branch from efc4e4e to a22c00f Compare September 6, 2024 15:21
@Chocobo1 Chocobo1 requested review from Chocobo1 and a team September 7, 2024 13:35
@Chocobo1 Chocobo1 added this to the 5.1 milestone Sep 7, 2024
@skomerko skomerko force-pushed the webui-torrent-deletion-improvements branch from a22c00f to e9fef52 Compare September 7, 2024 13:55
@Chocobo1 Chocobo1 requested a review from a team September 8, 2024 07:11
@Chocobo1 Chocobo1 merged commit 0ea35c5 into qbittorrent:master Sep 13, 2024
14 checks passed
@Chocobo1
Copy link
Member

@skomerko
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebUI WebUI-related issues/changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option for "Confirm torrent deletion" in WebUI
4 participants