// ============================================================ // UpdateSetting — 版本更新区块 // ============================================================ import { useState } from 'react'; import { Card, Button, Typography, Progress, Tag, Modal, Divider } from 'antd'; import { SyncOutlined, CheckCircleOutlined, ExclamationCircleOutlined, RocketOutlined, DownloadOutlined, FileTextOutlined, } from '@ant-design/icons'; import { useUpdater } from '@/hooks/use-updater'; import { isDev } from '@/utils/platform'; const { Text, Title } = Typography; /** 简单渲染 changelog(Markdown → JSX),支持 ## / - / --- */ function renderChangelog(markdown: string) { const lines = markdown.split('\n'); const elements: React.ReactNode[] = []; for (let i = 0; i < lines.length; i++) { const line = lines[i]; const key = `cl-${i}`; if (line.startsWith('## ')) { elements.push(