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

@@ -63,7 +63,7 @@
<div style="width: 100%; margin-top: 10px;">
<button type="button" style="width: 33%; line-height: 1.4em;" onclick="qBittorrent.SearchPlugins.installPlugin();">QBT_TR(Install new plugin)QBT_TR[CONTEXT=PluginSelectDlg]</button>
<button type="button" style="width: 33%; line-height: 1.4em;" onclick="qBittorrent.SearchPlugins.checkForUpdates();">QBT_TR(Check for updates)QBT_TR[CONTEXT=PluginSelectDlg]</button>
<button type="button" style="width: 32%; line-height: 1.4em;" onclick="qBittorrent.SearchPlugins.closeSearchWindow('searchPlugins');">QBT_TR(Close)QBT_TR[CONTEXT=PluginSelectDlg]</button>
<button type="button" style="width: 32%; line-height: 1.4em;" onclick="window.qBittorrent.Client.closeWindow(document.getElementById('searchPlugins'));">QBT_TR(Close)QBT_TR[CONTEXT=PluginSelectDlg]</button>
</div>
</div>
@@ -79,7 +79,6 @@
window.qBittorrent.SearchPlugins ??= (() => {
const exports = () => {
return {
closeSearchWindow: closeSearchWindow,
setup: setup,
installPlugin: installPlugin,
checkForUpdates: checkForUpdates,
@@ -113,10 +112,6 @@
updateTable();
};
const closeSearchWindow = (id) => {
window.parent.qBittorrent.Client.closeWindow(window.parent.$(id));
};
const installPlugin = (path) => {
new MochaUI.Window({
id: "installSearchPlugin",