Files
qBittorrent/src/webui/www/private/confirmruleclear.html
Hanabishi 06fe3e5fb0 WebUI: fix color scheme for iframes
Applies the color scheme for iframe dialogs.

Fixup for #21613.
PR #21750.
2024-11-09 16:02:28 +08:00

54 lines
2.2 KiB
HTML

<!DOCTYPE html>
<html lang="${LANG}" class="dark">
<head>
<meta charset="UTF-8">
<title>QBT_TR(Clear downloaded episodes)QBT_TR[CONTEXT=AutomatedRssDownloader]</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
<script src="scripts/localpreferences.js?v=${CACHEID}"></script>
<script src="scripts/color-scheme.js?v=${CACHEID}"></script>
<script>
"use strict";
window.addEventListener("DOMContentLoaded", () => {
const rules = new URI().getData("rules").split("|");
$("cancelBtn").focus();
$("cancelBtn").addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
window.parent.MochaUI.closeWindow(window.parent.$("clearRulesPage"));
});
$("confirmBtn").addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
let completionCount = 0;
rules.forEach((rule) => {
window.parent.qBittorrent.RssDownloader.modifyRuleState(decodeURIComponent(rule), "previouslyMatchedEpisodes", [], () => {
++completionCount;
if (completionCount === rules.length) {
window.parent.qBittorrent.RssDownloader.updateRulesList();
window.parent.MochaUI.closeWindow(window.parent.$("clearRulesPage"));
}
});
});
});
});
</script>
</head>
<body>
<div style="padding: 10px 10px 0px 10px;">
<p>QBT_TR(Are you sure you want to clear the list of downloaded episodes for the selected rule?)QBT_TR[CONTEXT=AutomatedRssDownloader]</p>
<div style="text-align: right;">
<input type="button" id="cancelBtn" value="QBT_TR(No)QBT_TR[CONTEXT=MainWindow]">
<input type="button" id="confirmBtn" value="QBT_TR(Yes)QBT_TR[CONTEXT=MainWindow]">
</div>
</div>
</body>
</html>