feat: file manager with browse, search, upload, chmod/chown

- Full file browser page at /files with lazy-load, breadcrumbs, drag&drop
- FileBrowserModal component for path selection from Samba/NFS forms
- PathField component replaces bare inputs in share/export forms
- Backend: /api/files/* routes with List, Mkdir, Rename, Delete, Chmod, Chown, Upload, Download, Preview, Search
- Reuses NASCTL_ALLOWED_ROOTS for path validation
- NASCTL_UPLOAD_MAX_BYTES (100MB) and NASCTL_PREVIEW_MAX_BYTES (256KB) env vars
- Capabilities endpoint returns chmod/chown availability (requires root)
- Version bump: 0.3.2 -> 0.4.0
This commit is contained in:
2026-07-06 01:56:40 -04:00
parent 0da789cd96
commit 50ed8abe95
17 changed files with 2209 additions and 30 deletions
+3 -3
View File
@@ -2,6 +2,7 @@ import { FormEvent, useEffect, useState } from "react";
import { api, SambaShare } from "../api";
import { useDirty } from "../DirtyContext";
import Modal from "../components/Modal";
import PathField from "../components/PathField";
const empty: Partial<SambaShare> = {
name: "",
@@ -119,10 +120,9 @@ export default function Samba() {
</div>
<div>
<label className="label">Path (absoluto)</label>
<input
className="input"
<PathField
value={editing.path ?? ""}
onChange={(e) => setEditing({ ...editing, path: e.target.value })}
onChange={p => setEditing({ ...editing, path: p })}
/>
</div>
<div>