mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
WebUI: Coding style fixes
This commit is contained in:
parent
cc3fbb118d
commit
d09070d310
6 changed files with 10 additions and 3 deletions
|
@ -19,6 +19,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById("cancelBtn").focus();
|
document.getElementById("cancelBtn").focus();
|
||||||
document.getElementById("cancelBtn").addEventListener("click", (e) => {
|
document.getElementById("cancelBtn").addEventListener("click", (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById("cancelBtn").focus();
|
document.getElementById("cancelBtn").focus();
|
||||||
document.getElementById("cancelBtn").addEventListener("click", (e) => {
|
document.getElementById("cancelBtn").addEventListener("click", (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
document.getElementById("cancelBtn").focus();
|
document.getElementById("cancelBtn").focus();
|
||||||
document.getElementById("cancelBtn").addEventListener("click", (e) => {
|
document.getElementById("cancelBtn").addEventListener("click", (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const searchParams = new URLSearchParams(window.location.search);
|
const searchParams = new URLSearchParams(window.location.search);
|
||||||
const host = searchParams.get("host");
|
const host = searchParams.get("host");
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const encodedUrls = new URLSearchParams(window.location.search).get("urls");
|
const encodedUrls = new URLSearchParams(window.location.search).get("urls");
|
||||||
if (encodedUrls !== null) {
|
if (encodedUrls !== null) {
|
||||||
const urls = encodedUrls.split("|").map(decodeURIComponent);
|
const urls = encodedUrls.split("|").map(decodeURIComponent);
|
||||||
|
|
|
@ -1777,16 +1777,17 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
||||||
case "Escape": {
|
case "Escape": {
|
||||||
if (event.target.isContentEditable)
|
if (event.target.isContentEditable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const modalInstances = Object.values(MochaUI.Windows.instances);
|
const modalInstances = Object.values(MochaUI.Windows.instances);
|
||||||
if (modalInstances.length <= 0)
|
if (modalInstances.length <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// MochaUI.currentModal does not update after a modal is closed
|
// MochaUI.currentModal does not update after a modal is closed
|
||||||
const focusedModal = modalInstances.find((modal) => {
|
const focusedModal = modalInstances.find((modal) => {
|
||||||
return modal.windowEl.hasClass("isFocused");
|
return modal.windowEl.hasClass("isFocused");
|
||||||
});
|
});
|
||||||
if (!focusedModal)
|
if (focusedModal !== undefined)
|
||||||
return;
|
|
||||||
focusedModal.close();
|
focusedModal.close();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1815,6 +1816,7 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
||||||
torrentsFilterElem.focus();
|
torrentsFilterElem.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue