import { Button, Modal } from 'antd'; import { SafetyCertificateOutlined } from '@ant-design/icons'; import type { CSSProperties } from 'react'; import type { OverlayWorkbenchTheme } from '../utils/overlayWorkbenchTheme'; import { SECURITY_UPDATE_ACTION_BUTTON_CLASS, SECURITY_UPDATE_MODAL_CLASS, getSecurityUpdateActionButtonStyle, getSecurityUpdateShellSurfaceStyle, } from '../utils/securityUpdateVisuals'; interface SecurityUpdateIntroModalProps { open: boolean; loading?: boolean; darkMode: boolean; overlayTheme: OverlayWorkbenchTheme; surfaceOpacity?: number; onStart: () => void; onPostpone: () => void; onViewDetails: () => void; } const actionButtonStyle: CSSProperties = { ...getSecurityUpdateActionButtonStyle(), height: 38, paddingInline: 18, }; const SecurityUpdateIntroModal = ({ open, loading = false, darkMode, overlayTheme, surfaceOpacity = 1, onStart, onPostpone, onViewDetails, }: SecurityUpdateIntroModalProps) => { return (
已保存配置安全更新
使用新的安全存储方式前,需要先完成一次本地配置更新。
)} open={open} closable={!loading} maskClosable={!loading} keyboard={!loading} onCancel={onPostpone} width={560} styles={{ content: getSecurityUpdateShellSurfaceStyle(overlayTheme, surfaceOpacity), header: { background: 'transparent', borderBottom: 'none', paddingBottom: 8 }, body: { paddingTop: 8 }, footer: { background: 'transparent', borderTop: 'none', paddingTop: 10 }, }} footer={[ , , , ]} >
为了让已保存的连接、代理和相关服务配置使用新的安全存储方式,本次更新需要进行一次本地配置更新。 更新前会自动创建本地备份;如果本次未完成,系统会保留当前可用配置,你也可以稍后继续。
); }; export type { SecurityUpdateIntroModalProps }; export default SecurityUpdateIntroModal;