/* * Copyright (c) 2026 by Christian Kellner. * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ import { useState } from 'react'; import { Banner, Button, Modal, Tag, Space, Typography, Descriptions, MarkdownRender } from '@douyinfe/semi-ui-19'; import { IconAlertCircle, IconArrowRight } from '@douyinfe/semi-icons'; import { useSelector } from '../../services/state/store.js'; import './VersionBanner.less'; import { useTranslation } from '../../services/i18n/i18n.jsx'; const { Text } = Typography; export default function VersionBanner() { const t = useTranslation(); const [modalVisible, setModalVisible] = useState(false); const versionUpdate = useSelector((state) => state.versionUpdate.versionUpdate); return ( <> {t('version.newVersionAvailable')} {versionUpdate.version} {t('version.currentLabel', { version: versionUpdate.localFredyVersion })} } /> Fredy {versionUpdate.version} {t('version.newBadge')} } visible={modalVisible} onCancel={() => setModalVisible(false)} width={640} footer={ } > {versionUpdate.localFredyVersion} {versionUpdate.version}
); }