import { Terminal, FolderSync, ArrowRightLeft, Globe, Plus, Zap, Clock } from 'lucide-react' import { useSessionStore } from '../stores' import { useTabStore } from '../stores/tabStore' import EmptyState from './common/EmptyState' interface WelcomeViewProps { onNewSession?: () => void onQuickConnect?: () => void } export default function WelcomeView({ onNewSession, onQuickConnect }: WelcomeViewProps) { const { addTab } = useTabStore() const sessions = useSessionStore((s) => s.sessions) // 取最近 5 个会话作为最近连接 const recentSessions = sessions.slice(-5).reverse() const handleSessionClick = (session: typeof sessions[number]) => { addTab({ title: session.name || session.host, type: 'terminal', sessionId: session.id, }) } return (
{/* Recent connections */}

最近连接

{recentSessions.length === 0 ? ( ) : (
{recentSessions.map((session) => ( ))}
)}
{/* Shortcuts hint */}
快捷键: Ctrl+N 新建会话 Ctrl+K 快速连接 Ctrl+T 新建标签
) }