This commit is contained in:
ryan
2026-07-13 15:08:40 +08:00
parent 08e8eea932
commit 1eff7878a1
441 changed files with 26491 additions and 18405 deletions
@@ -1,10 +1,16 @@
'use client';
import type {ReactNode} from 'react';
import type {LucideIcon} from 'lucide-react';
import type { ReactNode } from 'react';
import type { LucideIcon } from 'lucide-react';
import {Card, CardContent, CardDescription, CardHeader, CardTitle} from '@/components/ui/card';
import {cn} from '@/lib/utils';
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from '@/components/ui/card';
import { cn } from '@/lib/utils';
export function NodeInfoRow({
label,
@@ -16,9 +22,14 @@ export function NodeInfoRow({
className?: string;
}) {
return (
<div className={cn('flex items-start justify-between gap-4 py-2.5 text-sm', className)}>
<span className="shrink-0 text-muted-foreground">{label}</span>
<div className="min-w-0 text-right font-medium">{children}</div>
<div
className={cn(
'flex items-start justify-between gap-4 py-2.5 text-sm',
className,
)}
>
<span className='shrink-0 text-muted-foreground'>{label}</span>
<div className='min-w-0 text-right font-medium'>{children}</div>
</div>
);
}
@@ -33,12 +44,14 @@ export function NodeKpiCard({
icon?: LucideIcon;
}) {
return (
<div className="rounded-xl border bg-card/60 px-4 py-3.5 backdrop-blur-sm">
<div className="flex items-center gap-2 text-xs text-muted-foreground">
{Icon ? <Icon className="size-3.5 opacity-70" /> : null}
<div className='rounded-xl border bg-card/60 px-4 py-3.5 backdrop-blur-sm'>
<div className='flex items-center gap-2 text-xs text-muted-foreground'>
{Icon ? <Icon className='size-3.5 opacity-70' /> : null}
<span>{label}</span>
</div>
<p className="mt-2 text-sm font-semibold tracking-tight break-all">{value}</p>
<p className='mt-2 text-sm font-semibold tracking-tight break-all'>
{value}
</p>
</div>
);
}
@@ -58,10 +71,17 @@ export function NodeSectionCard({
}) {
return (
<Card className={cn('border shadow-none', className)}>
<CardHeader className={cn('pb-3', action ? 'flex-row items-start justify-between space-y-0' : '')}>
<div className="space-y-1">
<CardTitle className="text-base font-semibold">{title}</CardTitle>
{description ? <CardDescription>{description}</CardDescription> : null}
<CardHeader
className={cn(
'pb-3',
action ? 'flex-row items-start justify-between space-y-0' : '',
)}
>
<div className='space-y-1'>
<CardTitle className='text-base font-semibold'>{title}</CardTitle>
{description ? (
<CardDescription>{description}</CardDescription>
) : null}
</div>
{action}
</CardHeader>
@@ -72,8 +92,8 @@ export function NodeSectionCard({
export function NodeErrorBanner({ message }: { message: string }) {
return (
<div className="rounded-xl border border-destructive/25 bg-destructive/5 px-4 py-3 text-sm text-destructive">
<div className='rounded-xl border border-destructive/25 bg-destructive/5 px-4 py-3 text-sm text-destructive'>
{message}
</div>
);
}
}