99 Settings ,
1010 Sun ,
1111 Moon ,
12- Check ,
1312 Loader2 ,
1413 FolderOpen ,
1514 FileText ,
@@ -32,6 +31,7 @@ import { ThemeProvider } from '@/components/ThemeProvider';
3231import { OAuthConsentModal } from '@/components/OAuthConsentModal' ;
3332import { ServerInstallModal } from '@/components/ServerInstallModal' ;
3433import { SpaceSwitcher } from '@/components/SpaceSwitcher' ;
34+ import { ConnectIDEs } from '@/components/ConnectIDEs' ;
3535import { useDataSync } from '@/hooks/useDataSync' ;
3636import { useAppStore , useActiveSpace , useViewSpace , useTheme } from '@/stores' ;
3737import { RegistryPage } from '@/features/registry' ;
@@ -337,7 +337,6 @@ function DashboardView() {
337337 running : boolean ;
338338 url : string | null ;
339339 } > ( { running : false , url : null } ) ;
340- const [ exportSuccess , setExportSuccess ] = useState < string | null > ( null ) ;
341340 const viewSpace = useViewSpace ( ) ;
342341
343342 // Load stats on mount and when gateway changes
@@ -505,61 +504,11 @@ function DashboardView() {
505504 </ Card >
506505 </ div >
507506
508- { /* Client Config */ }
509- < Card >
510- < CardHeader >
511- < CardTitle > Connect Your Client</ CardTitle >
512- < CardDescription >
513- Add this server configuration to your MCP client settings (e.g., inside mcpServers section).
514- </ CardDescription >
515- </ CardHeader >
516- < CardContent >
517- < div className = "space-y-4" >
518- { /* Gateway URL */ }
519- < div className = "flex items-center gap-2 text-sm" >
520- < span className = { `h-2 w-2 rounded-full ${ gatewayStatus . running ? 'bg-green-500' : 'bg-orange-500' } ` } />
521- < span className = "text-[rgb(var(--muted))]" > Gateway:</ span >
522- < code className = "bg-[var(--surface)] px-2 py-1 rounded text-primary-500" >
523- { gatewayStatus . url || 'http://localhost:3100' }
524- </ code >
525- { ! gatewayStatus . running && (
526- < span className = "text-orange-500 text-xs" > (not running)</ span >
527- ) }
528- </ div >
529-
530- { /* Config Display */ }
531- < div className = "relative" >
532- < pre className = "bg-mcpmux-dark text-primary-100 p-4 rounded-lg text-sm overflow-x-auto font-mono" >
533- { `"mcpmux": {
534- "type": "http",
535- "url": "${ gatewayStatus . url || 'http://localhost:3100' } /mcp"
536- }` }
537- </ pre >
538- < Button
539- variant = "secondary"
540- size = "sm"
541- className = "absolute top-2 right-2"
542- onClick = { async ( ) => {
543- const config = `"mcpmux": {\n "type": "http",\n "url": "${ gatewayStatus . url || 'http://localhost:3100' } /mcp"\n}` ;
544- await navigator . clipboard . writeText ( config ) ;
545- setExportSuccess ( 'Config copied to clipboard!' ) ;
546- setTimeout ( ( ) => setExportSuccess ( null ) , 2000 ) ;
547- } }
548- data-testid = "copy-config-btn"
549- >
550- 📋 Copy
551- </ Button >
552- </ div >
553-
554- { exportSuccess && (
555- < div className = "text-sm text-green-600 dark:text-green-400 flex items-center gap-1" >
556- < Check className = "h-4 w-4" />
557- { exportSuccess }
558- </ div >
559- ) }
560- </ div >
561- </ CardContent >
562- </ Card >
507+ { /* Connect IDEs — one-click install */ }
508+ < ConnectIDEs
509+ gatewayUrl = { gatewayStatus . url || 'http://localhost:3100' }
510+ gatewayRunning = { gatewayStatus . running }
511+ />
563512 </ div >
564513 ) ;
565514}
0 commit comments