+ {!isComplete && (
+ <>
+ {/* Grid Overlay */}
+
-
- Scanning Content...
+
+ {isComplete ? (
+ <>
+ Analysis Complete
+ >
+ ) : (
+ <>
+ Scanning Content...
+ >
+ )}
-
- AI_MODEL: GEMINI-2.5-PRO
-
+ {!isComplete && (
+
+ AI_MODEL: GEMINI-2.5-PRO
+
+ )}
{/* Visual Flair: Simulated Crop Marks */}
-
- {/* Vertical crop lines showing "potential vertical format" */}
-
-
-
- {/* Center focus indicator */}
-
+ {!isComplete && (
+
+ {/* Vertical crop lines showing "potential vertical format" */}
+
+
+
+ {/* Center focus indicator */}
+
-
-
-
-
+
+
+
+
+ )}
{/* Bottom Info Bar */}
-
-
-
> ANALYSIS_THREAD_01: ACTIVE
-
> AUDIO_TRANSCRIPT: PROCESSING
+ {!isComplete && (
+
+
+
> ANALYSIS_THREAD_01: ACTIVE
+
> AUDIO_TRANSCRIPT: PROCESSING
+
+
-
-
+ )}
);
};
export default ProcessingAnimation;
-
diff --git a/dashboard/src/components/ResultCard.jsx b/dashboard/src/components/ResultCard.jsx
index 4d0160c..0f112db 100644
--- a/dashboard/src/components/ResultCard.jsx
+++ b/dashboard/src/components/ResultCard.jsx
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
-import { Download, Share2, Instagram, Youtube, Video, CheckCircle, AlertCircle, X, Loader2 } from 'lucide-react';
+import { Download, Share2, Instagram, Youtube, Video, CheckCircle, AlertCircle, X, Loader2, Copy } from 'lucide-react';
import { getApiUrl } from '../config';
export default function ResultCard({ clip, index, jobId, uploadPostKey, uploadUserId }) {
@@ -10,11 +10,11 @@ export default function ResultCard({ clip, index, jobId, uploadPostKey, uploadUs
youtube: true
});
const [posting, setPosting] = useState(false);
- const [postResult, setPostResult] = useState(null); // { success: boolean, msg: string }
+ const [postResult, setPostResult] = useState(null);
const handlePost = async () => {
if (!uploadPostKey || !uploadUserId) {
- setPostResult({ success: false, msg: "Missing API Key or User ID. Configure them at the top." });
+ setPostResult({ success: false, msg: "Missing API Key or User ID." });
return;
}
@@ -42,7 +42,6 @@ export default function ResultCard({ clip, index, jobId, uploadPostKey, uploadUs
if (!res.ok) {
const errText = await res.text();
- // Try parsing JSON error
try {
const jsonErr = JSON.parse(errText);
throw new Error(jsonErr.detail || errText);
@@ -51,8 +50,7 @@ export default function ResultCard({ clip, index, jobId, uploadPostKey, uploadUs
}
}
- const data = await res.json();
- setPostResult({ success: true, msg: "Posted successfully! Check your social accounts." });
+ setPostResult({ success: true, msg: "Posted successfully!" });
setTimeout(() => {
setShowModal(false);
setPostResult(null);
@@ -68,86 +66,84 @@ export default function ResultCard({ clip, index, jobId, uploadPostKey, uploadUs
const videoUrl = getApiUrl(clip.video_url);
return (
-
-
-
-
-
-
-
-
- Clip {index + 1}
-
-
- {clip.start}s - {clip.end}s
-
-
- YouTube Short Title
-
-
-
- {clip.video_title_for_youtube_short || "Viral Clip"}
-
-
-
-
-
-
- Instagram Description
-
-
- {clip.video_description_for_instagram}
-
-
-
-
-
- TikTok Description
-
-
- {clip.video_description_for_tiktok || clip.video_description_for_instagram}
-
-
-
-
-
-
-
- Download
-
-
+
+ {/* Left: Video Preview (Fixed Width on Desktop) */}
+
+
+
+
+ Clip {index + 1}
+
- {/* Modal */}
+ {/* Right: Content & Details */}
+
+
+
+ {clip.video_title_for_youtube_short || "Viral Clip Generated"}
+
+
+ {Math.floor(clip.end - clip.start)}s
+ #shorts
+ #viral
+
+
+
+ {/* Scrollable Descriptions Area */}
+
+ {/* YouTube */}
+
+
+ YouTube Title
+
+
+ {clip.video_title_for_youtube_short || "Viral Short Video"}
+
+
+
+ {/* TikTok / IG */}
+
+
+
+ /
+
+ Caption
+
+
+ {clip.video_description_for_tiktok || clip.video_description_for_instagram}
+
+
+
+
+ {/* Actions Footer */}
+
+
+
+ Download
+
+
+
+
+ {/* Post Modal */}
{showModal && (
-
-
+
+
-
Post to Socials
+
Post to Socials
{!uploadPostKey && (
-
-
-
- Please configure your Upload-Post API Key at the top of the page first.
-
+
+
+
Configure API Key in Settings first.
)}
-
+
{postResult && (
-
- {postResult.success ?
:
}
+
+ {postResult.success ?
:
}
{postResult.msg}
)}
@@ -219,15 +187,7 @@ export default function ResultCard({ clip, index, jobId, uploadPostKey, uploadUs
disabled={posting || !uploadPostKey}
className="w-full py-3 bg-primary hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed rounded-xl text-white font-bold transition-all flex items-center justify-center gap-2"
>
- {posting ? (
- <>
-
Publishing...
- >
- ) : (
- <>
-
Publish Now
- >
- )}
+ {posting ? <>
Publishing...> : <>
Publish Now>}
diff --git a/dashboard/src/index.css b/dashboard/src/index.css
index 755176d..356f96b 100644
--- a/dashboard/src/index.css
+++ b/dashboard/src/index.css
@@ -20,6 +20,25 @@
@apply bg-primary hover:bg-blue-600 text-white px-6 py-3 rounded-xl font-medium transition-all active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-primary/20;
}
+/* Custom Scrollbar */
+.custom-scrollbar::-webkit-scrollbar {
+ width: 6px;
+ height: 6px;
+}
+
+.custom-scrollbar::-webkit-scrollbar-track {
+ background: transparent;
+}
+
+.custom-scrollbar::-webkit-scrollbar-thumb {
+ background: rgba(255, 255, 255, 0.1);
+ border-radius: 10px;
+}
+
+.custom-scrollbar::-webkit-scrollbar-thumb:hover {
+ background: rgba(255, 255, 255, 0.2);
+}
+
/* Custom Animations */
@keyframes scan {
0% { top: 0%; opacity: 0; }