import { Modal, Tag } from "antd"; import { motion, useReducedMotion } from "motion/react"; import { ScrollText } from "lucide-react"; import { useState, type CSSProperties } from "react"; import ReactMarkdown from "react-markdown"; import { aceternityMotion } from "@/lib/aceternity-motion"; export const APP_VERSION = __APP_VERSION__; type AppChangelogButtonProps = { className?: string; style?: CSSProperties; showVersion?: boolean; showLabel?: boolean; labelClassName?: string; versionClassName?: string; }; export function AppChangelogButton({ className, style, showVersion = false, showLabel = false, labelClassName, versionClassName }: AppChangelogButtonProps) { const [open, setOpen] = useState(false); return ( <> setOpen(true)} aria-label="查看更新日志" title="更新日志"> {showLabel ? 更新日志 : null} {showVersion ? v{APP_VERSION.replace(/^v/, "")} : null} setOpen(false)} /> > ); } function AppChangelogModal({ open, onClose }: { open: boolean; onClose: () => void }) { const reducedMotion = useReducedMotion(); return ( 更新日志v{APP_VERSION.replace(/^v/, "")}产品能力、交互与稳定性变化} open={open} width={760} footer={null} centered onCancel={onClose} styles={{ body: { maxHeight: "min(72vh, 760px)", overflowY: "auto", overscrollBehavior: "contain" } }} modalRender={(node) => ( {node} )} > {children}, h2: ({ children }) => {children}, ul: ({ children }) => {children}, li: ({ children }) => {children}, p: ({ children }) => {children}, code: ({ children }) => {children}, }} > {__APP_CHANGELOG__} ); }
{children}