/** * Component: Download Client Card * Documentation: documentation/phase3/download-clients.md */ 'use client'; import React from 'react'; interface DownloadClientCardProps { client: { id: string; type: 'qbittorrent' | 'sabnzbd'; name: string; url: string; enabled: boolean; }; onEdit: () => void; onDelete: () => void; } export function DownloadClientCard({ client, onEdit, onDelete }: DownloadClientCardProps) { const typeName = client.type === 'qbittorrent' ? 'qBittorrent' : 'SABnzbd'; const typeColor = client.type === 'qbittorrent' ? 'bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300' : 'bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300'; // Truncate URL for display const displayUrl = client.url.length > 40 ? `${client.url.substring(0, 40)}...` : client.url; return (
{/* Client Info */}

{client.name}

{!client.enabled && ( Disabled )}
{typeName}

{displayUrl}

{/* Action Buttons */}
{/* Edit Button */} {/* Delete Button */}
); }