@@ -27,7 +27,9 @@ import StandaloneTextToSpeech from "./components/StandaloneTextToSpeech";
2727import VoiceChanger from "./components/VoiceChanger" ;
2828import DocumentToMedia from "./components/DocumentToMedia" ;
2929import { AuthProvider , useAuth } from "./contexts/AuthContext" ;
30+ import { ApiKeyProvider } from "./contexts/ApiKeyContext" ;
3031import AuthModal from "./components/AuthModal" ;
32+ import SettingsModal from "./components/SettingsModal" ;
3133
3234function AppContent ( ) {
3335 const [ transcript , setTranscript ] = useState < TranscriptResponse | null > ( null ) ;
@@ -42,6 +44,7 @@ function AppContent() {
4244 > ( "dashboard" ) ;
4345 const [ sidebarOpen , setSidebarOpen ] = useState ( true ) ;
4446 const [ showAuthModal , setShowAuthModal ] = useState ( false ) ;
47+ const [ showSettingsModal , setShowSettingsModal ] = useState ( false ) ;
4548
4649 const { currentUser, userProfile, logout } = useAuth ( ) ;
4750
@@ -389,9 +392,14 @@ function AppContent() {
389392 Sign In
390393 </ button >
391394 ) }
392- < button className = "p-2 rounded-lg hover:bg-gray-700 transition-colors" >
393- < Settings className = "h-5 w-5 text-gray-300" />
394- </ button >
395+ { currentUser && (
396+ < button
397+ onClick = { ( ) => setShowSettingsModal ( true ) }
398+ className = "p-2 rounded-lg hover:bg-gray-700 transition-colors"
399+ >
400+ < Settings className = "h-5 w-5 text-gray-300" />
401+ </ button >
402+ ) }
395403 </ div >
396404 </ div >
397405 </ header >
@@ -484,7 +492,7 @@ function AppContent() {
484492 : "0 min" }
485493 </ p >
486494 </ div >
487- < Headphones className = "h-8 w-8 text-green -500" />
495+ < Headphones className = "h-8 w-8 text-cyan -500" />
488496 </ div >
489497 </ div >
490498
@@ -547,7 +555,7 @@ function AppContent() {
547555
548556 { activeTab === "document-to-media" && (
549557 < div className = "p-4 lg:p-6" >
550- < DocumentToMedia apiKey = { apiKey } />
558+ < DocumentToMedia />
551559 </ div >
552560 ) }
553561 </ div >
@@ -577,7 +585,7 @@ function AppContent() {
577585 < span className = "ml-1" > © { currentYear } </ span >
578586 </ p >
579587 < div className = "text-xs text-gray-500" >
580- Professional AI Studio v3.1
588+ Professional AI Studio v3.2
581589 </ div >
582590 </ div >
583591 </ footer >
@@ -588,14 +596,21 @@ function AppContent() {
588596 onClose = { ( ) => setShowAuthModal ( false ) }
589597 defaultMode = "login"
590598 />
599+
600+ < SettingsModal
601+ isOpen = { showSettingsModal }
602+ onClose = { ( ) => setShowSettingsModal ( false ) }
603+ />
591604 </ div >
592605 ) ;
593606}
594607
595608function App ( ) {
596609 return (
597610 < AuthProvider >
598- < AppContent />
611+ < ApiKeyProvider >
612+ < AppContent />
613+ </ ApiKeyProvider >
599614 </ AuthProvider >
600615 ) ;
601616}
0 commit comments