import React from "react"; import { Monitor, Apple, Terminal, Download, type LucideIcon, } from "lucide-react"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; /** * 平台下载网格(Windows / macOS / Linux 三卡) * 三个平台按钮常驻;某平台没有对应安装包时按钮置灰禁用(不删除), * 并在卡内提示"暂未提供此平台版本"。 */ export interface PlatformDownload { /** 展示文件名(可选) */ name?: string; url: string; } export interface PlatformSlot { key: string; label: string; icon: LucideIcon; /** url 为空/缺失 = 该平台暂无版本,按钮禁用 */ download?: PlatformDownload | null; /** 无版本时的提示文案 */ hint?: string; } interface PlatformDownloadGridProps { platforms: PlatformSlot[]; onDownload: (slot: PlatformSlot) => void; className?: string; } export function PlatformDownloadGrid({ platforms, onDownload, className, }: PlatformDownloadGridProps) { return (
{p.hint || "暂未提供此平台版本"}
)}