Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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; admins can also rename and delete)
- Access your torrent files over FTPS and from the file list in a torrent's detail panel
- 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
Expand Down Expand Up @@ -129,7 +129,7 @@ Then upload `.testdata/hello.torrent` in the UI while the webseed server is runn
Explicit FTPS (`AUTH TLS`) on `SEEDLY_FTP_LISTEN`; plaintext logins are refused unless
`SEEDLY_FTP_ALLOW_PLAINTEXT=true`. Log in with your Seedly username and password.

- **Scope:** each user only sees their own torrents' files (the root lists the content of their torrents). Members are read-only; admins can also upload, rename, delete and create folders. The torrent's files are also listed in its detail panel in the web UI (any user's torrent for admins, via "View as").
- **Scope:** each user only sees their own torrents' files (the root lists the content of their torrents). Members are read-only; admins can also upload, rename, delete and create folders. The torrent's files are also listed in its detail panel in the web UI, where they can be selected and downloaded (any user's torrent for admins, via "View as").
- **Brute force:** failed logins (web and FTP) are throttled per IP — see `SEEDLY_LOGIN_MAX_FAILURES` / `SEEDLY_LOGIN_BAN`.
- **Ports:** publish the control port (e.g. `21:2121`) and the whole `SEEDLY_FTP_PASV_PORTS` range, and open them in your firewall. Set `SEEDLY_FTP_PUBLIC_HOST` to the public hostname.
- **TLS** — pick one:
Expand Down
11 changes: 0 additions & 11 deletions web/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -822,17 +822,6 @@ button.danger {
font-size: 0.78rem;
}

.fm-row-actions {
display: flex;
gap: 0.25rem;
flex: none;
}

.fm-row-actions button {
padding: 0.15rem 0.4rem;
font-size: 0.75rem;
}

.fm-note {
margin: 0 0 0.75rem;
}
Expand Down
40 changes: 0 additions & 40 deletions web/src/FileManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms))
export function FileManager({ torrentId, zipUrl }: { torrentId: number; zipUrl?: string }) {
const [dir, setDir] = useState('/')
const [entries, setEntries] = useState<FileEntry[]>([])
const [writable, setWritable] = useState(false)
const [error, setError] = useState('')
const [busy, setBusy] = useState(false)
const [progress, setProgress] = useState('')
Expand All @@ -38,7 +37,6 @@ export function FileManager({ torrentId, zipUrl }: { torrentId: number; zipUrl?:
const res = await api.listFiles(torrentId, path)
setDir(res.path)
setEntries(res.entries)
setWritable(res.writable)
setError('')
} catch (err) {
setError(err instanceof Error ? err.message : 'Could not list files')
Expand All @@ -51,18 +49,6 @@ export function FileManager({ torrentId, zipUrl }: { torrentId: number; zipUrl?:
void load('/')
}, [load])

async function run(op: () => Promise<unknown>) {
setBusy(true)
try {
await op()
await load(dir)
} catch (err) {
setError(err instanceof Error ? err.message : 'Operation failed')
} finally {
setBusy(false)
}
}

function toggle(path: string, isDir: boolean) {
setSelected((cur) => {
const next = new Map(cur)
Expand Down Expand Up @@ -168,32 +154,6 @@ export function FileManager({ torrentId, zipUrl }: { torrentId: number; zipUrl?:
</a>
)}
{e.is_dir ? null : <span className="muted fm-size">{formatBytes(e.size)}</span>}
{writable ? (
<span className="fm-row-actions">
<button
type="button"
disabled={busy}
onClick={() => {
const to = prompt('New name', e.name)?.trim()
if (to && to !== e.name) {
void run(() => api.renameFile(torrentId, full, join(dir, to)))
}
}}
>
Rename
</button>
<button
type="button"
className="danger"
disabled={busy}
onClick={() => {
if (confirm(`Delete “${e.name}”?`)) void run(() => api.deleteFile(torrentId, full))
}}
>
Delete
</button>
</span>
) : null}
</li>
)
})}
Expand Down
9 changes: 0 additions & 9 deletions web/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,6 @@ export const api = {
request<FileListing>(`/api/torrents/${torrentId}/files?${fileQuery(path)}`),
fileDownloadUrl: (torrentId: number, path: string) =>
`/api/torrents/${torrentId}/files/download?${fileQuery(path)}`,
renameFile: (torrentId: number, from: string, to: string) =>
request<{ status: string }>(`/api/torrents/${torrentId}/files/rename`, {
method: 'POST',
body: JSON.stringify({ from, to }),
}),
deleteFile: (torrentId: number, path: string) =>
request<{ status: string }>(`/api/torrents/${torrentId}/files?${fileQuery(path)}`, {
method: 'DELETE',
}),
}

function fileQuery(path: string): string {
Expand Down
Loading