This commit is contained in:
rgrgogu
2026-07-20 08:17:38 +08:00
parent cab0883512
commit d021725c1b
8 changed files with 149 additions and 168 deletions
+11 -26
View File
@@ -185,12 +185,6 @@ export default function AddAsset() {
hasFileError = true;
}
// Thumbnail is required for video, optional for audio
if (isVideo && !thumbnailRef.current) {
setError("_thumbnail", { message: "A thumbnail is required for video uploads." });
hasFileError = true;
}
if (hasFileError) return;
setProgress({ phase: "uploading", pct: 0 });
@@ -259,15 +253,14 @@ export default function AddAsset() {
</Link>
</div>
{/* ── Thumbnail (video required / audio optional) ── */}
{/* ── Thumbnail (optional for both video and audio) ── */}
{(isVideo || isAudio) && (
<div className="space-y-1.5">
<Label>
Thumbnail{" "}
{isVideo
? <span className="text-destructive">*</span>
: <span className="text-muted-foreground text-xs">(optional — album / cover art)</span>
}
<span className="text-muted-foreground text-xs">
(optional — {isVideo ? "video preview" : "album / cover art"})
</span>
</Label>
<DropZone
key={thumbKey}
@@ -350,23 +343,15 @@ export default function AddAsset() {
/>
</div>
{/* Storage Provider */}
{/* Storage Provider — TEMPORARY: locked to S3 (see zrok tunnel note above; revert after VPS migration) */}
<div className="space-y-1.5">
<Label>Storage</Label>
<Controller
name="storage_provider"
control={control}
render={({ field }) => (
<Select value={field.value} onValueChange={field.onChange}>
<SelectTrigger><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value="chibisafe">Chibisafe</SelectItem>
<SelectItem value="local">Local</SelectItem>
<SelectItem value="s3">S3</SelectItem>
</SelectContent>
</Select>
)}
/>
<Select value="s3" disabled>
<SelectTrigger className="disabled:opacity-60 disabled:cursor-not-allowed"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value="s3">S3</SelectItem>
</SelectContent>
</Select>
</div>
</div>