"use client"; import type { ReactNode } from "react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Dialog, DialogContent, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; import webConfig from "@/constants/common-env"; import { useVersionCheck } from "@/hooks/use-version-check"; import { cn } from "@/lib/utils"; function typeVariant(type: string): "success" | "danger" | "info" | "violet" | "outline" { if (type === "新增") return "success"; if (type === "修复") return "danger"; if (type === "调整") return "info"; if (type === "文档") return "violet"; return "outline"; } export function VersionReleaseDialog({ className }: { className?: string }) { const { open, setOpen, openReleaseModal, latestVersion, releases, checking, hasNewVersion, checkLatestRelease, } = useVersionCheck(); return ( <> > ); } function VersionCard({ label, value, action, }: { label: string; value: string; action?: ReactNode; }) { return (