WebUI: Always close one window

Closing all windows is overly broad and never the intention.

PR #21804.
This commit is contained in:
Thomas Piccirello 2024-11-16 04:12:35 -03:00 committed by GitHub
commit 1cd3c586c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 70 additions and 70 deletions

View file

@ -30,7 +30,7 @@ window.qBittorrent.Client ??= (() => {
const exports = () => {
return {
closeWindow: closeWindow,
closeWindows: closeWindows,
closeFrameWindow: closeFrameWindow,
getSyncMainDataInterval: getSyncMainDataInterval,
isStopped: isStopped,
stop: stop,
@ -51,8 +51,8 @@ window.qBittorrent.Client ??= (() => {
MochaUI.closeWindow(window);
};
const closeWindows = () => {
MochaUI.closeAll();
const closeFrameWindow = (window) => {
closeWindow(window.frameElement.closest("div.mocha").id);
};
const getSyncMainDataInterval = () => {