From 1eec87f061479d99187c8b86eca8130db31d3ec5 Mon Sep 17 00:00:00 2001 From: "juancarlos.cavero" Date: Sat, 20 Dec 2025 00:59:27 +0100 Subject: [PATCH] changed UI --- dashboard/src/App.jsx | 418 ++++++++++-------- dashboard/src/components/KeyInput.jsx | 2 +- dashboard/src/components/MediaInput.jsx | 4 +- .../src/components/ProcessingAnimation.jsx | 102 +++-- dashboard/src/components/ResultCard.jsx | 224 ++++------ dashboard/src/index.css | 19 + 6 files changed, 418 insertions(+), 351 deletions(-) diff --git a/dashboard/src/App.jsx b/dashboard/src/App.jsx index 61a1674..ea13f50 100644 --- a/dashboard/src/App.jsx +++ b/dashboard/src/App.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { Upload, FileVideo, Sparkles, Youtube, Instagram, Share2, LogOut, ChevronDown, Check, Activity } from 'lucide-react'; +import { Upload, FileVideo, Sparkles, Youtube, Instagram, Share2, LogOut, ChevronDown, Check, Activity, LayoutDashboard, Settings, PlusCircle, History, Menu, X, Terminal } from 'lucide-react'; import KeyInput from './components/KeyInput'; import MediaInput from './components/MediaInput'; import ResultCard from './components/ResultCard'; @@ -21,27 +21,22 @@ const UserProfileSelector = ({ profiles, selectedUserId, onSelect }) => { const selectedProfile = profiles.find(p => p.username === selectedUserId) || profiles[0]; return ( -
- +
{isOpen && ( -
+
{profiles.map((profile) => ( + + + + + +
+ ); + + return ( +
+ + +
+ {/* Background Gradients */} +
+
+
+ + {/* Top Header */} +
+
+ {status !== 'idle' && ( + + )} +
+ +
+ {userProfiles.length > 0 && ( + + )} + + {!apiKey && ( + + API Key Missing + + )} +
-
- - -
-
-
-
- -
- setUploadPostKey(e.target.value)} - className="flex-1 bg-black/20 border border-white/10 rounded-lg px-4 py-2 text-sm text-zinc-300 focus:outline-none focus:border-primary/50 transition-colors" - /> - -
-
- - {userProfiles.length > 0 ? ( - - ) : ( -
- - setUploadUserId(e.target.value)} - className="w-full bg-black/20 border border-white/10 rounded-lg px-4 py-2 text-sm text-zinc-300 focus:outline-none focus:border-primary/50 transition-colors" - /> -
- )} -
- -
-

- Social Auto-Post -

-

- Connect your accounts to post directly to TikTok, Instagram & YouTube. -

-

- Post directly to all your social networks. Start with a free trial (no credit card required). Simply connect your accounts, generate an API Key, and you're ready to go. -

- - Get Account Used - -
-
-
-
- -
- - - {status === 'processing' && processingMedia && ( - - )} - - {(status === 'processing' || status === 'error') && ( -
-
-
- - {status === 'error' ? 'Process Failed' : 'Processing Status'} -
- -
- - {logsVisible && ( -
- {logs.map((log, i) => ( -
- {'>'} {log} + {/* Main Workspace */} +
+ + {/* View: Settings */} + {activeTab === 'settings' && ( +
+

Settings

+ + +
+

Social Integration

+
+ +
+ setUploadPostKey(e.target.value)} + className="input-field" + placeholder="ey..." + /> + +
+

+ Connect your Upload-Post account to enable one-click publishing. +

- ))} - {status === 'processing' &&
{'>'} _
} -
- )} - {!logsVisible && status === 'processing' && ( -
- Analyzing video content with Gemini AI... -
- )} +
+
+ )} + + {/* View: Dashboard (Idle) */} + {activeTab === 'dashboard' && status === 'idle' && ( +
+
+
+

+ Create Viral Shorts +

+

+ Drop your long-form video URL or file below to instantly generate viral clips with AI. +

+
+ + + +
+ YouTube + Instagram + TikTok +
+
)} - {status === 'error' && ( -
- Processing encountered an error. - - -
- )} + {/* View: Processing / Results (Split View) */} + {activeTab === 'dashboard' && (status === 'processing' || status === 'complete' || status === 'error') && ( +
+ + {/* Left Panel: Preview & Status */} +
+
+

+ + Live Analysis +

+ + {status.toUpperCase()} + +
- {status === 'complete' && results && ( -
-

- Results Generated -

-
- {results.clips.map((clip, i) => ( - - ))} + {/* Video Preview */} + {processingMedia && } + + {/* Logs Terminal */} +
+
+ + System Logs + + +
+ {logsVisible && ( +
+ {logs.map((log, i) => ( +
+ {new Date().toLocaleTimeString()} + {log} +
+ ))} + {status === 'processing' && ( +
_
+ )} +
+ )} +
+ + {/* Right Panel: Results Grid */} +
+

+ + Generated Shorts + {results?.clips?.length > 0 && ( + + {results.clips.length} Clips + + )} +

+ +
+ {results && results.clips && results.clips.length > 0 ? ( +
+ {results.clips.map((clip, i) => ( + + ))} +
+ ) : ( + status === 'processing' ? ( +
+
+

Waiting for clips...

+
+ ) : status === 'error' ? ( +
+

Generation failed.

+
+ ) : null + )} +
+
+
)} +
-
+
); } diff --git a/dashboard/src/components/KeyInput.jsx b/dashboard/src/components/KeyInput.jsx index 6267a75..4c40ba2 100644 --- a/dashboard/src/components/KeyInput.jsx +++ b/dashboard/src/components/KeyInput.jsx @@ -18,7 +18,7 @@ export default function KeyInput({ onKeySet, savedKey }) { }; return ( -
+
diff --git a/dashboard/src/components/MediaInput.jsx b/dashboard/src/components/MediaInput.jsx index 40a08fb..9c02d54 100644 --- a/dashboard/src/components/MediaInput.jsx +++ b/dashboard/src/components/MediaInput.jsx @@ -24,8 +24,8 @@ export default function MediaInput({ onProcess, isProcessing }) { }; return ( -
-
+
+