mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
ready
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user