// ============================================================ // SystemInfoSetting — 系统信息区块(只读展示) // ============================================================ import { Card, Tag, Typography } from 'antd'; import { WindowsOutlined, AppleOutlined, InfoCircleOutlined, EnvironmentOutlined, } from '@ant-design/icons'; import { useAppContext } from '@/components/AppProvider'; import { getPlatformName } from '@/utils/platform'; import { APP_VERSION } from '@shared/constants/version'; import { getEditionName } from '@shared/constants/app'; const { Text } = Typography; export function SystemInfoSetting() { const { platform, edition, isDevMode } = useAppContext(); const platformIcon = platform === 'darwin' ? ( ) : platform === 'win32' ? ( ) : ( ); const infoItems = [ { label: '运行平台', value: getPlatformName(), icon: platformIcon, color: 'purple' }, { label: '应用版本', value: `V${APP_VERSION}`, icon: , color: 'blue' }, { label: '版本类型', value: getEditionName(edition), icon: , color: edition === 'enterprise' ? 'gold' : 'green', }, { label: '运行环境', value: isDevMode ? '开发模式' : '生产模式', icon: , color: isDevMode ? 'orange' : 'green', }, ]; return (
{infoItems.map((item) => (
{item.icon} {item.label}: {item.value}
))}
); }