Added deletion and simultaneous deletion of files/transfers on the Files screen.

This commit is contained in:
2025-10-24 20:51:44 +03:00
parent fb3b61e297
commit b79b60ea0f
3 changed files with 147 additions and 5 deletions

View File

@@ -60,11 +60,12 @@
ws?.send(JSON.stringify({ type: "select", infoHash: hash, index }));
}
async function removeTorrent(hash) {
if (!confirm("Bu transferi silmek istediğine emin misin?")) return;
await apiFetch(`/api/torrents/${hash}`, { method: "DELETE" }); // ✅
await list();
}
async function removeTorrent(hash) {
if (!confirm("Bu transferi silmek istediğine emin misin?")) return;
await apiFetch(`/api/torrents/${hash}`, { method: "DELETE" });
torrents = torrents.filter(t => t.infoHash !== hash);
await list();
}
function streamURL(hash, index = 0) {
const token = localStorage.getItem("token");