Set confirmTorrentDeletion to checked by default

This commit is contained in:
Carve 2024-10-17 16:08:13 -04:00
parent 8890cc004d
commit f84ec827f0
2 changed files with 20 additions and 20 deletions

View File

@ -743,7 +743,7 @@
deleteVisibleTorrentsFN = function() {
const hashes = torrentsTable.getFilteredTorrentsHashes(selectedStatus, selectedCategory, selectedTag, selectedTracker);
if (hashes.length > 0) {
if (window.qBittorrent.Cache.preferences.get().confirm_torrent_deletion) {
// if (window.qBittorrent.Cache.preferences.get().confirm_torrent_deletion) {
new MochaUI.Modal({
...window.qBittorrent.Dialog.baseModalOptions,
id: "confirmDeletionPage",
@ -759,24 +759,24 @@
}
});
}
else {
new Request({
url: "api/v2/torrents/delete",
method: "post",
data: {
hashes: hashes.join("|"),
deleteFiles: false,
},
onSuccess: () => {
torrentsTable.deselectAll();
updateMainData();
updatePropertiesPanel();
},
onFailure: () => {
alert("Unable to delete torrents.");
}
}).send();
}
// else {
// new Request({
// url: "api/v2/torrents/delete",
// method: "post",
// data: {
// hashes: hashes.join("|"),
// deleteFiles: false,
// },
// onSuccess: () => {
// torrentsTable.deselectAll();
// updateMainData();
// updatePropertiesPanel();
// },
// onFailure: () => {
// alert("Unable to delete torrents.");
// }
// }).send();
// }
}
};

View File

@ -10,7 +10,7 @@
<fieldset class="settings">
<legend>Transfer list</legend>
<div class="formRow" style="margin-bottom: 3px;" title="Shows a confirmation dialog upon torrent deletion">
<input type="checkbox" id="confirmTorrentDeletion">
<input type="checkbox" id="confirmTorrentDeletion" checked>
<label for="confirmTorrentDeletion">Confirm when deleting torrents</label>
</div>
<div class="formRow" style="margin-bottom: 3px;">