WebUI: keep preferences window open after unsuccessful save

This gives the user another opportunity to save their changes.

PR #23549.
This commit is contained in:
Tom Piccirello
2025-12-20 01:21:26 -08:00
committed by GitHub
parent 93470f2080
commit 1c231ce014

View File

@@ -3219,8 +3219,8 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
window.parent.location.reload();
window.parent.qBittorrent.Client.closeWindow(document.getElementById("preferencesPage"));
}).catch((error) => {
// keep window open so user can reattempt saving
alert("QBT_TR(Unable to save program preferences, qBittorrent is probably unreachable.)QBT_TR[CONTEXT=HttpServer]");
window.parent.qBittorrent.Client.closeWindow(document.getElementById("preferencesPage"));
});
};