1 <div id=
"confirmRecheckDialog">
2 <div class=
"genericConfirmGrid">
3 <span class=
"confirmGridItem confirmWarning"></span>
4 <span class=
"confirmGridItem dialogMessage" id=
"confirmRecheckMessage"></span>
8 <input type=
"button" value=
"QBT_TR(Yes)QBT_TR[CONTEXT=MainWindow]" id=
"confirmRecheckButton">
9 <input type=
"button" value=
"QBT_TR(No)QBT_TR[CONTEXT=MainWindow]" id=
"cancelRecheckButton">
16 const confirmButton
= document
.getElementById("confirmRecheckButton");
17 const cancelButton
= document
.getElementById("cancelRecheckButton");
18 const confirmText
= document
.getElementById("confirmRecheckMessage");
21 options
: { data
: { hashes
} },
23 } = window
.MUI
.Windows
.instances
["confirmRecheckDialog"];
25 confirmText
.textContent
= "QBT_TR(Are you sure you want to recheck the selected torrent(s)?)QBT_TR[CONTEXT=confirmRecheckDialog]";
27 cancelButton
.addEventListener("click", (e
) => { window
.qBittorrent
.Client
.closeWindow("confirmRecheckDialog"); });
28 confirmButton
.addEventListener("click", (e
) => {
30 url
: "api/v2/torrents/recheck",
33 hashes
: hashes
.join("|"),
37 window
.qBittorrent
.Client
.closeWindow("confirmRecheckDialog");
40 alert("QBT_TR(Unable to recheck torrents.)QBT_TR[CONTEXT=HttpServer]");
45 // set tabindex so window element receives keydown events
46 windowEl
.setAttribute("tabindex", "-1");
48 windowEl
.addEventListener("keydown", (e
) => {
51 confirmButton
.click();
54 window
.qBittorrent
.Client
.closeWindow("confirmRecheckDialog");