mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-11 01:44:58 -06:00
WebUI: Always close one window
Closing all windows is overly broad and never the intention. PR #21804.
This commit is contained in:
committed by
GitHub
parent
0f12d077c8
commit
1cd3c586c1
@@ -69,7 +69,7 @@
|
||||
});
|
||||
|
||||
cancelButton.focus();
|
||||
cancelButton.addEventListener("click", (e) => { window.qBittorrent.Client.closeWindows(); });
|
||||
cancelButton.addEventListener("click", (e) => { window.qBittorrent.Client.closeWindow("confirmDeletionPage"); });
|
||||
|
||||
confirmButton.addEventListener("click", (e) => {
|
||||
// Some torrents might be removed when waiting for user input, so refetch the torrent list
|
||||
@@ -88,7 +88,7 @@
|
||||
torrentsTable.deselectAll();
|
||||
updateMainData();
|
||||
updatePropertiesPanel();
|
||||
window.qBittorrent.Client.closeWindows();
|
||||
window.qBittorrent.Client.closeWindow("confirmDeletionPage");
|
||||
},
|
||||
onFailure: () => {
|
||||
alert("QBT_TR(Unable to delete torrents.)QBT_TR[CONTEXT=HttpServer]");
|
||||
|
||||
@@ -3042,12 +3042,12 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
data: settings,
|
||||
onFailure: () => {
|
||||
alert("QBT_TR(Unable to save program preferences, qBittorrent is probably unreachable.)QBT_TR[CONTEXT=HttpServer]");
|
||||
window.parent.qBittorrent.Client.closeWindows();
|
||||
window.parent.qBittorrent.Client.closeWindow("preferencesPage");
|
||||
},
|
||||
onSuccess: () => {
|
||||
// Close window
|
||||
window.parent.location.reload();
|
||||
window.parent.qBittorrent.Client.closeWindows();
|
||||
window.parent.qBittorrent.Client.closeWindow("preferencesPage");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user