import { Terminal, FolderSync, ArrowRightLeft, Globe, Settings, Plus, Zap, Inbox } from 'lucide-react' import { useSessionStore } from '../stores' import { useTabStore } from '../stores/tabStore' 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 新建标签
) }