Update video editing interface to better support shows and episodes
Remove episode number input and adjust labels/placeholders for show titles and episode details in the video editing form. Modify submission logic to directly use form data. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 170e18f0-0f13-4eca-8643-546bba1dd8cc Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/170e18f0-0f13-4eca-8643-546bba1dd8cc/uPMtWcA
This commit is contained in:
parent
9b39f101c2
commit
4bf0501f11
@ -224,7 +224,6 @@ function EditVideoDialog({
|
|||||||
artist: video.artist || "",
|
artist: video.artist || "",
|
||||||
description: video.description,
|
description: video.description,
|
||||||
filename: video.filename || "",
|
filename: video.filename || "",
|
||||||
episodeNumber: video.episodeNumber || "",
|
|
||||||
episodeTitle: video.episodeTitle || "",
|
episodeTitle: video.episodeTitle || "",
|
||||||
tags: video.tags || [],
|
tags: video.tags || [],
|
||||||
contentType: video.contentType,
|
contentType: video.contentType,
|
||||||
@ -277,12 +276,7 @@ function EditVideoDialog({
|
|||||||
|
|
||||||
const handleSubmit = (e: React.FormEvent) => {
|
const handleSubmit = (e: React.FormEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
// Convert episodeNumber to number if provided
|
updateMutation.mutate(formData);
|
||||||
const submitData = {
|
|
||||||
...formData,
|
|
||||||
episodeNumber: formData.episodeNumber ? parseInt(formData.episodeNumber.toString()) : null
|
|
||||||
};
|
|
||||||
updateMutation.mutate(submitData);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const generateAIDescription = async () => {
|
const generateAIDescription = async () => {
|
||||||
@ -400,26 +394,26 @@ function EditVideoDialog({
|
|||||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-white/90">
|
<Label className="text-white/90">
|
||||||
{formData.episodeNumber ? 'Episode Title / Show Name' : 'Song Title'}
|
{formData.episodeTitle ? 'Show Name' : 'Song Title'}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
value={formData.title}
|
value={formData.title}
|
||||||
onChange={(e) => setFormData({ ...formData, title: e.target.value })}
|
onChange={(e) => setFormData({ ...formData, title: e.target.value })}
|
||||||
className="bg-white/10 border-white/20 text-white"
|
className="bg-white/10 border-white/20 text-white"
|
||||||
placeholder={formData.episodeNumber ? "Episode title or show name..." : "Song title..."}
|
placeholder={formData.episodeTitle ? "Show name (e.g., Die Geschichte des Liedes)..." : "Song title..."}
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-white/90">
|
<Label className="text-white/90">
|
||||||
{formData.episodeNumber ? 'Guest / Performer' : 'Artist / Band'}
|
{formData.episodeTitle ? 'Main Artist / Band' : 'Artist / Band'}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
<Input
|
||||||
value={formData.artist}
|
value={formData.artist}
|
||||||
onChange={(e) => setFormData({ ...formData, artist: e.target.value })}
|
onChange={(e) => setFormData({ ...formData, artist: e.target.value })}
|
||||||
className="bg-white/10 border-white/20 text-white"
|
className="bg-white/10 border-white/20 text-white"
|
||||||
placeholder={formData.episodeNumber ? "Guest name or performer..." : "Artist or band name..."}
|
placeholder={formData.episodeTitle ? "Main artist or band name..." : "Artist or band name..."}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -427,35 +421,19 @@ function EditVideoDialog({
|
|||||||
<Label className="text-white/90">Original Filename (from CDN)</Label>
|
<Label className="text-white/90">Original Filename (from CDN)</Label>
|
||||||
<Input
|
<Input
|
||||||
value={formData.filename || ''}
|
value={formData.filename || ''}
|
||||||
onChange={(e) => setFormData({ ...formData, filename: e.target.value })}
|
|
||||||
className="bg-white/10 border-white/20 text-white"
|
className="bg-white/10 border-white/20 text-white"
|
||||||
placeholder="Original filename from CDN..."
|
placeholder="Automatically filled from CDN..."
|
||||||
|
readOnly
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-white/90">Episode Number (for shows)</Label>
|
<Label className="text-white/90">Episode Title / Guest Name</Label>
|
||||||
<Input
|
|
||||||
type="number"
|
|
||||||
value={formData.episodeNumber}
|
|
||||||
onChange={(e) => setFormData({ ...formData, episodeNumber: e.target.value })}
|
|
||||||
className="bg-white/10 border-white/20 text-white"
|
|
||||||
placeholder="e.g., 15 (leave empty for music videos)"
|
|
||||||
/>
|
|
||||||
{formData.episodeNumber && (
|
|
||||||
<p className="text-sm text-blue-300 mt-1">
|
|
||||||
Show mode: Fields above adjusted for episode content
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<Label className="text-white/90">Episode Title (for shows)</Label>
|
|
||||||
<Input
|
<Input
|
||||||
value={formData.episodeTitle}
|
value={formData.episodeTitle}
|
||||||
onChange={(e) => setFormData({ ...formData, episodeTitle: e.target.value })}
|
onChange={(e) => setFormData({ ...formData, episodeTitle: e.target.value })}
|
||||||
className="bg-white/10 border-white/20 text-white"
|
className="bg-white/10 border-white/20 text-white"
|
||||||
placeholder="e.g., Folk Show Special"
|
placeholder="e.g., Ansambel Zupan"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user