Fix for deletion

Styling of selects, inputs, etc.
This commit is contained in:
Carve 2024-10-17 16:24:20 -04:00
parent f84ec827f0
commit 281c60590b
3 changed files with 28 additions and 26 deletions

View File

@ -7,6 +7,7 @@
--darkmode-background-light: #aaaaaa;
--darkmode-text: #c2c2c2;
--darkmode-text-alt: #d3d3d3;
--color-text-default: var(--darkmode-background);
--darkmode-line-color: #2F3437;
--highlight-color--darkred: #b83739;
--highlight-color--red: #ce292c;

View File

@ -23,15 +23,16 @@ input[type="password"],
input[type="button"],
button,
select {
border: 1px solid var(--color-border-default);
border-radius: 3px;
color: var(--color-text-default);
padding: 4px;
background-color: var(--darkmode-background);
border: solid 1px var(--darkmode-line-color);
border-radius: 8px;
padding: 4px 4px 4px 10px;
color: var(--darkmode-text);
}
input[type="checkbox"],
input[type="radio"] {
accent-color: var(--color-accent-blue);
accent-color: var(--darkmode-primary);
}
input[type="button"],

View File

@ -473,7 +473,7 @@
deleteSelectedTorrentsFN = function(forceDeleteFiles = false) {
const hashes = torrentsTable.selectedRowsIds();
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",
@ -492,25 +492,25 @@
document.getElementById("modalOverlay").style.display = "none";
}
});
}
else {
new Request({
url: "api/v2/torrents/delete",
method: "post",
data: {
hashes: hashes.join("|"),
deleteFiles: forceDeleteFiles
},
onSuccess: function() {
torrentsTable.deselectAll();
updateMainData();
updatePropertiesPanel();
},
onFailure: function() {
alert("Unable to delete torrents.");
}
}).send();
}
// }
// else {
// new Request({
// url: "api/v2/torrents/delete",
// method: "post",
// data: {
// hashes: hashes.join("|"),
// deleteFiles: forceDeleteFiles
// },
// onSuccess: function() {
// torrentsTable.deselectAll();
// updateMainData();
// updatePropertiesPanel();
// },
// onFailure: function() {
// alert("Unable to delete torrents.");
// }
// }).send();
// }
}
};
@ -758,7 +758,7 @@
MochaUI.centerWindow(w);
}
});
}
// }
// else {
// new Request({
// url: "api/v2/torrents/delete",