feat: add Spark Plug module for PDF to 3D generation and move API settings to Dashboard
Build and Deploy / build-and-push (push) Successful in 45s
Build and Deploy / build-and-push (push) Successful in 45s
This commit is contained in:
@@ -3,17 +3,19 @@ import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { X, Settings, Key, Sparkles, Image as ImageIcon, Lightbulb, Box } from 'lucide-react';
|
||||
import { cn } from '../lib/utils';
|
||||
|
||||
interface ApiSettingsModalProps {
|
||||
interface DashboardSettingsProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
export const ApiSettingsModal: React.FC<ApiSettingsModalProps> = ({ isOpen, onClose }) => {
|
||||
export const DashboardSettings: React.FC<DashboardSettingsProps> = ({ isOpen, onClose }) => {
|
||||
const [falApiKey, setFalApiKey] = useState('');
|
||||
const [tripoApiKey, setTripoApiKey] = useState('');
|
||||
const [meshyApiKey, setMeshyApiKey] = useState('');
|
||||
const [stabilityApiKey, setStabilityApiKey] = useState('');
|
||||
const [openAiKey, setOpenAiKey] = useState('');
|
||||
const [geminiApiKey, setGeminiApiKey] = useState('');
|
||||
const [nanoBananaApiKey, setNanoBananaApiKey] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
@@ -22,6 +24,8 @@ export const ApiSettingsModal: React.FC<ApiSettingsModalProps> = ({ isOpen, onCl
|
||||
setMeshyApiKey(localStorage.getItem('MESHY_API_KEY') || '');
|
||||
setStabilityApiKey(localStorage.getItem('stability_api_key') || '');
|
||||
setOpenAiKey(localStorage.getItem('openai_api_key') || '');
|
||||
setGeminiApiKey(localStorage.getItem('GEMINI_API_KEY') || '');
|
||||
setNanoBananaApiKey(localStorage.getItem('NANO_BANANA_API_KEY') || '');
|
||||
}
|
||||
}, [isOpen]);
|
||||
|
||||
@@ -31,6 +35,8 @@ export const ApiSettingsModal: React.FC<ApiSettingsModalProps> = ({ isOpen, onCl
|
||||
localStorage.setItem('MESHY_API_KEY', meshyApiKey);
|
||||
localStorage.setItem('stability_api_key', stabilityApiKey);
|
||||
localStorage.setItem('openai_api_key', openAiKey);
|
||||
localStorage.setItem('GEMINI_API_KEY', geminiApiKey);
|
||||
localStorage.setItem('NANO_BANANA_API_KEY', nanoBananaApiKey);
|
||||
onClose();
|
||||
};
|
||||
|
||||
@@ -65,6 +71,45 @@ export const ApiSettingsModal: React.FC<ApiSettingsModalProps> = ({ isOpen, onCl
|
||||
{/* Content */}
|
||||
<div className="flex-1 overflow-y-auto p-6 bg-zinc-900/50 flex flex-col gap-6 custom-scrollbar">
|
||||
|
||||
{/* Spark Plug APIs */}
|
||||
<div className="flex flex-col gap-4">
|
||||
<h3 className="text-xs font-bold text-zinc-500 uppercase tracking-widest flex items-center gap-2">
|
||||
<Lightbulb size={14} /> Spark Plug (PDF to 3D)
|
||||
</h3>
|
||||
|
||||
<div className="grid grid-cols-1 gap-4 pl-2 border-l-2 border-zinc-800">
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<label className="text-sm font-bold text-amber-400">Gemini AI Key</label>
|
||||
<span className="text-[10px] text-zinc-500">For PDF Idea Extraction</span>
|
||||
</div>
|
||||
<input
|
||||
type="password"
|
||||
placeholder="Enter Google Gemini API Key..."
|
||||
value={geminiApiKey}
|
||||
onChange={(e) => setGeminiApiKey(e.target.value)}
|
||||
className="bg-zinc-950 border border-zinc-800 rounded-lg px-4 py-2 text-sm text-white focus:outline-none focus:border-amber-500/50"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="flex items-center justify-between">
|
||||
<label className="text-sm font-bold text-yellow-400">Nano Banana Key</label>
|
||||
<span className="text-[10px] text-zinc-500">For Concept Image Generation</span>
|
||||
</div>
|
||||
<input
|
||||
type="password"
|
||||
placeholder="Enter Nano Banana API Key..."
|
||||
value={nanoBananaApiKey}
|
||||
onChange={(e) => setNanoBananaApiKey(e.target.value)}
|
||||
className="bg-zinc-950 border border-zinc-800 rounded-lg px-4 py-2 text-sm text-white focus:outline-none focus:border-yellow-500/50"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="h-px bg-zinc-800/50 w-full" />
|
||||
|
||||
{/* 3D Generation */}
|
||||
<div className="flex flex-col gap-4">
|
||||
<h3 className="text-xs font-bold text-zinc-500 uppercase tracking-widest flex items-center gap-2">
|
||||
Reference in New Issue
Block a user