diff --git a/package.json b/package.json index fa36975..4600f2a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fredy", - "version": "20.0.3", + "version": "20.0.4", "description": "[F]ind [R]eal [E]states [d]amn eas[y].", "scripts": { "prepare": "husky", diff --git a/ui/src/components/version/VersionBanner.jsx b/ui/src/components/version/VersionBanner.jsx index da56fc0..50ec052 100644 --- a/ui/src/components/version/VersionBanner.jsx +++ b/ui/src/components/version/VersionBanner.jsx @@ -3,36 +3,86 @@ * Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause */ -import { Collapse, Descriptions } from '@douyinfe/semi-ui-19'; +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 { MarkdownRender } from '@douyinfe/semi-ui-19'; import './VersionBanner.less'; +const { Text } = Typography; + export default function VersionBanner() { + const [modalVisible, setModalVisible] = useState(false); const versionUpdate = useSelector((state) => state.versionUpdate.versionUpdate); + return ( - - -
-

A new version of Fredy is available. Update now to take advantage of the latest features and bug fixes.

- - {versionUpdate.localFredyVersion} - {versionUpdate.version} - - - {versionUpdate.url} - {' '} - - -

- - Release Notes - -

+ <> + + + + + New version available + + + {versionUpdate.version} + + + Current: {versionUpdate.localFredyVersion} + + + +
+ } + /> + + Fredy {versionUpdate.version} + + New + + + } + visible={modalVisible} + onCancel={() => setModalVisible(false)} + width={640} + footer={ + + + + + } + > + + {versionUpdate.localFredyVersion} + {versionUpdate.version} + +
-
-
+ + ); } diff --git a/ui/src/components/version/VersionBanner.less b/ui/src/components/version/VersionBanner.less index be5abd8..9bb697b 100644 --- a/ui/src/components/version/VersionBanner.less +++ b/ui/src/components/version/VersionBanner.less @@ -1,7 +1,24 @@ .versionBanner { - background: rgba(var(--semi-teal-1), 1); + margin-bottom: 0 !important; - &__content { - overflow: auto; + .semi-banner-body { + padding: 6px 16px; } -} \ No newline at end of file + + &__bar { + display: flex; + align-items: center; + justify-content: space-between; + width: 100%; + } + + &__details { + margin-bottom: 16px; + } + + &__notes { + max-height: 400px; + overflow-y: auto; + padding-right: 4px; + } +}