mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-04 07:06:36 +08:00
63cd906cfc
- Merge all files inside openflare-server to the repository root directory. - Relocate agent, relay, and flared subprojects from internal/ to internal/apps/. - Combine docker-compose files and update build context paths to root. - Update GitHub workflows and Dockerfiles to refer to new directories and package names. - Rewrite Go package imports across all files. - Resolve database renew test race condition and clean up docs.
31 lines
768 B
TypeScript
31 lines
768 B
TypeScript
import {Badge} from '@/components/ui/badge';
|
|
import {cn} from '@/lib/utils';
|
|
|
|
import type {StatusTone} from './node-utils';
|
|
|
|
const toneClassName: Record<StatusTone, string> = {
|
|
success: 'bg-emerald-500/10 border-emerald-500/20 text-emerald-600',
|
|
warning: 'bg-amber-500/10 border-amber-500/20 text-amber-600',
|
|
danger: 'bg-destructive/10 border-destructive/20 text-destructive',
|
|
info: 'bg-blue-500/10 border-blue-500/20 text-blue-600',
|
|
};
|
|
|
|
export function NodeStatusBadge({
|
|
label,
|
|
tone,
|
|
className,
|
|
}: {
|
|
label: string;
|
|
tone: StatusTone;
|
|
className?: string;
|
|
}) {
|
|
return (
|
|
<Badge
|
|
variant="outline"
|
|
className={cn('text-[10px] rounded-full py-0 px-2 font-medium', toneClassName[tone], className)}
|
|
>
|
|
{label}
|
|
</Badge>
|
|
);
|
|
}
|