diff --git a/frontend/components/dashboard/scan-terminal/ContinentGroupHeader.tsx b/frontend/components/dashboard/scan-terminal/ContinentGroupHeader.tsx new file mode 100644 index 00000000..97429688 --- /dev/null +++ b/frontend/components/dashboard/scan-terminal/ContinentGroupHeader.tsx @@ -0,0 +1,50 @@ +"use client"; + +import { ChevronDown, ChevronRight } from "lucide-react"; +import type { ContinentGroup } from "@/components/dashboard/scan-terminal/continent-grouping"; + +export function ContinentGroupHeader({ + group, + isExpanded, + isEn, + onToggle, +}: { + group: ContinentGroup; + isExpanded: boolean; + isEn: boolean; + onToggle: () => void; +}) { + const label = isEn ? group.labelEn : group.labelZh; + const parts: string[] = [`${group.rows.length}`]; + + if (group.activeCount > 0) { + parts.push(isEn ? `Active ${group.activeCount}` : `活跃 ${group.activeCount}`); + } + if (group.watchCount > 0) { + parts.push(isEn ? `Watch ${group.watchCount}` : `观察 ${group.watchCount}`); + } + if (group.localTimeRange) { + parts.push(`LT ${group.localTimeRange}`); + } + if (group.hotCity) { + parts.push(isEn ? `Hot: ${group.hotCity}` : `热门: ${group.hotCity}`); + } + + return ( + + ); +}