Files
Kaname/src/components/model-status-badge.tsx
T
Pascal LinxweilerandClaude Opus 5.5 67191b3e16
Release / release (push) Successful in 11m41s
Release 0.4.0: Kaname, search, filters and tags
- Rename the app to Kaname
- Hub metadata per model (base models, architecture, license, Hub tags),
  backfilled by the worker for existing models
- Library search across repo/author/family/quant/tags and multi-select
  facet filters (author, family, quant, tag, status) kept in the URL
- Custom tags (model page editor, on add, click-to-filter)
- README rewritten around a quick install, with banner and screenshots
- deploy/compose.yaml: models in a host folder (KANAME_MODELS_DIR)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:49:17 +02:00

17 lines
759 B
TypeScript

import { Badge } from "@/components/ui/badge";
import type { ModelStatus } from "@/lib/db/schema";
export const MODEL_STATUS: Record<ModelStatus, { label: string; variant: "default" | "secondary" | "destructive" | "outline" }> = {
pending: { label: "not downloaded", variant: "outline" },
downloading: { label: "downloading", variant: "secondary" },
ready: { label: "ok", variant: "default" },
incomplete: { label: "missing files", variant: "destructive" },
failed: { label: "failed", variant: "destructive" },
deleting: { label: "deleting", variant: "secondary" },
};
export function ModelStatusBadge({ status }: { status: ModelStatus }) {
const { label, variant } = MODEL_STATUS[status];
return <Badge variant={variant}>{label}</Badge>;
}