main
UI Deploy (Next-Auth Support) 🎨 / build-and-deploy (push) Has been cancelled

This commit is contained in:
Harun CAN
2026-04-05 21:10:51 +03:00
parent dd8878d403
commit 5b03bec882
5 changed files with 124 additions and 13 deletions
@@ -33,6 +33,7 @@ import { SceneCard } from '@/components/project/scene-card';
import { RenderProgress } from '@/components/project/render-progress';
import { VideoPlayer } from '@/components/project/video-player';
import { projectsApi } from '@/lib/api/api-service';
import { CINEMATIC_REFERENCES } from '@/constants/cinematic-references';
// X (Twitter) ikonunu burada da tanımlıyoruz
const XIcon = ({ size = 16 }: { size?: number }) => (
@@ -255,8 +256,18 @@ export default function ProjectDetailPage() {
try {
await projectsApi.update(id, { videoStyle: newStyleId } as any);
refetch();
} catch (err) {
console.error('Üslup (Stil) değiştirme hatası:', err);
} catch (error) {
console.error('Failed to update style:', error);
}
};
const handleCinematicReferenceChange = async (newRef: string) => {
if (newRef === project.cinematicReference) return;
try {
await projectsApi.update(id, { cinematicReference: newRef || undefined } as any);
refetch();
} catch (error) {
console.error('Failed to update cinematic reference:', error);
}
};
@@ -354,6 +365,24 @@ export default function ProjectDetailPage() {
) : (
<span>{currentStyle ? `${currentStyle.emoji} ${currentStyle.label}` : project.videoStyle}</span>
)}
{project.videoStyle === 'CINEMATIC' && isEditable ? (
<select
value={project.cinematicReference || ''}
onChange={(e) => handleCinematicReferenceChange(e.target.value)}
className="bg-[var(--color-bg-base)] border border-[var(--color-border-faint)] rounded-md px-2 py-0.5 text-xs text-[var(--color-text-secondary)] focus:outline-none focus:border-violet-500/50 cursor-pointer w-44 truncate"
>
<option value="">🎬 Sinematik Yönetmen/Film...</option>
{CINEMATIC_REFERENCES.map(ref => (
<option key={ref.value} value={ref.value}>{ref.label}</option>
))}
</select>
) : project.videoStyle === 'CINEMATIC' && project.cinematicReference ? (
<span className="flex items-center gap-1">
🎬 <span className="truncate max-w-[150px]">{project.cinematicReference}</span>
</span>
) : null}
<span className="uppercase text-[10px] tracking-wider">{project.language}</span>
<span className="text-[10px]">
{new Date(project.createdAt).toLocaleDateString('tr-TR', {
@@ -485,7 +514,11 @@ export default function ProjectDetailPage() {
isEditable={isEditable}
onUpdate={handleSceneUpdate}
onRegenerate={handleSceneRegenerate}
onGenerateImage={handleGenerateImage}
onUpscaleImage={handleUpscaleImage}
isRegenerating={regeneratingSceneId === scene.id}
isGeneratingImage={generatingImageId === scene.id}
isUpscalingImage={upscalingImageId === scene.id}
/>
))}
</div>