/** * Terminal Connection Progress * Displays connection progress with logs and timeout */ import { AlertCircle,Clock,Play,ShieldCheck } from 'lucide-react'; import React from 'react'; import { Button } from '../ui/button'; import { ScrollArea } from '../ui/scroll-area'; export interface TerminalConnectionProgressProps { status: 'connecting' | 'connected' | 'disconnected'; error: string | null; timeLeft: number; isCancelling: boolean; showLogs: boolean; setShowLogs: (show: boolean) => void; progressLogs: string[]; onCancel: () => void; onRetry: () => void; } export const TerminalConnectionProgress: React.FC = ({ status, error, timeLeft, isCancelling, showLogs, setShowLogs, progressLogs, onCancel, onRetry, }) => { return ( <>
{status === 'connecting' ? `Timeout in ${timeLeft}s` : error || 'Disconnected'}
{status === 'connecting' ? ( ) : (
)}
{showLogs && (
{progressLogs.map((line, idx) => (
{line}
))} {error && (
{error}
)}
)} ); }; export default TerminalConnectionProgress;