import React from 'react'; import { Card, CardContent } from '~/components/ui/Card'; import { Progress } from '~/components/ui/Progress'; import { RotateCw, Trash2, Code, Database, Package, Loader2 } from 'lucide-react'; import { classNames } from '~/utils/classNames'; import type { OllamaModel } from './types'; // Model Card Component interface ModelCardProps { model: OllamaModel; onUpdate: () => void; onDelete: () => void; } function ModelCard({ model, onUpdate, onDelete }: ModelCardProps) { return (

{model.name}

{model.status && model.status !== 'idle' && ( {model.status === 'updating' && 'Updating'} {model.status === 'updated' && 'Updated'} {model.status === 'error' && 'Error'} )}
{model.digest.substring(0, 8)}
{model.details && ( <>
{model.details.parameter_size}
{model.details.quantization_level}
)}
{model.progress && (
{model.progress.status} {Math.round((model.progress.current / model.progress.total) * 100)}%
)}
); } export default ModelCard;