mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
WebUI: Improve torrent deletion dialog
This PR improves torrent deletion dialog. 1. Now shows different message depending on the number of selected torrents 2. Visually pretty much inline with the GUI 3. Adjusts to content on load 4. Now uses XHR load method. Panels / windows loaded using this method become part of the current document so there is no need to import styles or scripts (they should load marginally faster now). PR #21185. --------- Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
This commit is contained in:
@@ -29,6 +29,7 @@ window.qBittorrent ??= {};
|
||||
window.qBittorrent.Client ??= (() => {
|
||||
const exports = () => {
|
||||
return {
|
||||
closeWindow: closeWindow,
|
||||
closeWindows: closeWindows,
|
||||
genHash: genHash,
|
||||
getSyncMainDataInterval: getSyncMainDataInterval,
|
||||
@@ -44,6 +45,13 @@ window.qBittorrent.Client ??= (() => {
|
||||
};
|
||||
};
|
||||
|
||||
const closeWindow = function(windowID) {
|
||||
const window = document.getElementById(windowID);
|
||||
if (!window)
|
||||
return;
|
||||
MochaUI.closeWindow(window);
|
||||
};
|
||||
|
||||
const closeWindows = function() {
|
||||
MochaUI.closeAll();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user