From 7ec45515d2263b0fa7ee60eb20abcad877991e72 Mon Sep 17 00:00:00 2001 From: Louis FRADIN Date: Mon, 12 Oct 2026 13:55:19 +0200 Subject: [PATCH] Remove Upload and New folder from the torrent file list Co-Authored-By: Claude Sonnet 5.5 --- README.md | 2 +- web/src/FileManager.tsx | 52 +++++++++++------------------------------ web/src/api.ts | 13 ----------- 3 files changed, 14 insertions(+), 53 deletions(-) diff --git a/README.md b/README.md index b1f28f1..4b53d88 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Open http://localhost:8080 and sign in with: - Local username/password sessions; first admin bootstrapped from env when the DB is empty - Users see only their torrents; admins can switch **View as** another user -- Access your torrent files over FTPS and from the file list in a torrent's detail panel (read-only for members, read-write for admins) +- Access your torrent files over FTPS and from the file list in a torrent's detail panel (read-only for members; admins can also rename and delete) - Add torrents via `.torrent` upload, one or several files at a time (per-file errors are reported without blocking the rest) - Progress / status / peers / downloaded / uploaded with pause, resume, delete - Completed torrents keep seeding until paused or deleted diff --git a/web/src/FileManager.tsx b/web/src/FileManager.tsx index 3e80124..d2cbd2b 100644 --- a/web/src/FileManager.tsx +++ b/web/src/FileManager.tsx @@ -54,46 +54,20 @@ export function FileManager({ torrentId }: { torrentId: number }) {

Files

- - - {writable ? ( -
- - -
+ {crumbs.map((c, i) => ( + + + {i < crumbs.length - 1 ? ' / ' : ''} + + ))} + ) : null} {error ?

{error}

: null} diff --git a/web/src/api.ts b/web/src/api.ts index 3de24fd..aa56bda 100644 --- a/web/src/api.ts +++ b/web/src/api.ts @@ -188,19 +188,6 @@ export const api = { request(`/api/torrents/${torrentId}/files?${fileQuery(path)}`), fileDownloadUrl: (torrentId: number, path: string) => `/api/torrents/${torrentId}/files/download?${fileQuery(path)}`, - uploadFiles: (torrentId: number, dir: string, files: File[]) => { - const fd = new FormData() - for (const f of files) fd.append('files', f) - return request<{ uploaded: number }>(`/api/torrents/${torrentId}/files/upload?${fileQuery(dir)}`, { - method: 'POST', - body: fd, - }) - }, - mkdir: (torrentId: number, path: string) => - request<{ status: string }>(`/api/torrents/${torrentId}/files/mkdir`, { - method: 'POST', - body: JSON.stringify({ path }), - }), renameFile: (torrentId: number, from: string, to: string) => request<{ status: string }>(`/api/torrents/${torrentId}/files/rename`, { method: 'POST',