@@ -301,7 +301,13 @@ const PrivacySettings = () => {
301301 )
302302}
303303
304- const IntegrationDetailsModal = ( { integration, onClose } ) => {
304+ const IntegrationDetailsModal = ( {
305+ integration,
306+ onClose,
307+ onConnect,
308+ onDisconnect,
309+ isProcessing
310+ } ) => {
305311 if ( ! integration ) return null
306312
307313 const IntegrationIcon = integration . icon || IconSettingsCog
@@ -322,7 +328,7 @@ const IntegrationDetailsModal = ({ integration, onClose }) => {
322328 onClick = { ( e ) => e . stopPropagation ( ) }
323329 className = "bg-gradient-to-br from-[var(--color-primary-surface)] to-[var(--color-primary-background)] p-6 rounded-2xl shadow-xl w-full max-w-2xl border border-[var(--color-primary-surface-elevated)] max-h-[90vh] flex flex-col"
324330 >
325- < div className = "flex justify-between items-start mb-6" >
331+ < div className = "flex justify-between items-start mb-6 flex-shrink-0 " >
326332 < div className = "flex items-center gap-4" >
327333 < IntegrationIcon className = "w-10 h-10 text-[var(--color-accent-blue)]" />
328334 < div >
@@ -343,13 +349,45 @@ const IntegrationDetailsModal = ({ integration, onClose }) => {
343349 < IconX size = { 20 } />
344350 </ button >
345351 </ div >
346- < div className = "overflow-y-auto custom-scrollbar pr-2 space-y-6" >
347- { showPrivacyFilters ? (
348- < PrivacySettings />
349- ) : (
350- < div className = "text-center text-gray-400 p-8 bg-[var(--color-primary-surface)]/50 rounded-lg" >
351- No privacy filters are available for this tool yet.
352+ < div className = "overflow-y-auto custom-scrollbar pr-2 space-y-6 flex-grow" >
353+ < div className = "bg-[var(--color-primary-surface)]/50 p-4 rounded-lg border border-[var(--color-primary-surface-elevated)]" >
354+ < h4 className = "text-lg font-semibold text-gray-200 mb-2" >
355+ Capabilities
356+ </ h4 >
357+ < p className = "text-gray-400 text-sm" >
358+ { integration . description }
359+ </ p >
360+ </ div >
361+
362+ { showPrivacyFilters && < PrivacySettings /> }
363+ </ div >
364+ < div className = "mt-6 pt-4 border-t border-[var(--color-primary-surface-elevated)] flex-shrink-0" >
365+ { isProcessing ? (
366+ < div className = "flex justify-center" >
367+ < IconLoader className = "w-6 h-6 animate-spin text-[var(--color-accent-blue)]" />
352368 </ div >
369+ ) : integration . connected ? (
370+ < button
371+ onClick = { ( e ) => {
372+ e . stopPropagation ( )
373+ onDisconnect ( integration . name )
374+ } }
375+ className = "flex items-center justify-center gap-2 w-full py-2 px-3 rounded-md bg-[var(--color-accent-red)]/20 hover:bg-[var(--color-accent-red)]/40 text-[var(--color-accent-red)] text-sm font-medium transition-colors"
376+ >
377+ < IconPlugOff size = { 16 } />
378+ < span > Disconnect</ span >
379+ </ button >
380+ ) : (
381+ < button
382+ onClick = { ( e ) => {
383+ e . stopPropagation ( )
384+ onConnect ( integration )
385+ } }
386+ className = "flex items-center justify-center gap-2 w-full py-2 px-3 rounded-md bg-[var(--color-accent-blue)]/80 hover:bg-[var(--color-accent-blue)] text-white text-sm font-medium transition-colors"
387+ >
388+ < IconPlugConnected size = { 16 } />
389+ < span > Connect</ span >
390+ </ button >
353391 ) }
354392 </ div >
355393 </ motion . div >
@@ -665,6 +703,11 @@ const IntegrationsPage = () => {
665703 < IntegrationDetailsModal
666704 integration = { selectedIntegration }
667705 onClose = { ( ) => setSelectedIntegration ( null ) }
706+ onConnect = { handleConnect }
707+ onDisconnect = { handleDisconnect }
708+ isProcessing = {
709+ processingIntegration === selectedIntegration ?. name
710+ }
668711 />
669712 ) }
670713 </ AnimatePresence >
0 commit comments