WebUI: fix window can not close regression

Fix up 1cd3c586c1.
Fix up e1bd1038c0.

PR #21919.
This commit is contained in:
Chocobo1
2024-11-29 23:59:58 +08:00
committed by GitHub
parent 90aecfea02
commit e8d8de8f19
6 changed files with 20 additions and 25 deletions

View File

@@ -3043,12 +3043,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.closeWindow("preferencesPage");
window.parent.qBittorrent.Client.closeWindow(document.getElementById("preferencesPage"));
},
onSuccess: () => {
// Close window
window.parent.location.reload();
window.parent.qBittorrent.Client.closeWindow("preferencesPage");
window.parent.qBittorrent.Client.closeWindow(document.getElementById("preferencesPage"));
}
});
};