From e6760d3dfc9ef24a5b685d2097ac822842ae4c12 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sat, 1 Aug 2026 16:40:33 +0100 Subject: [PATCH] Add SoftwareUpdateIcon component and integrate into About and AppUpdateProgress - Created SoftwareUpdateIcon component using SVG for software update representation. - Replaced DownloadIcon with SoftwareUpdateIcon in the About component's update actions for better visual context. - Enhanced AppUpdateProgress modal title with SoftwareUpdateIcon for improved user interface clarity. - Updated imports and styling in relevant components to accommodate the new icon. --- assets/icons/softwareupdateicon.svg | 8 ++++++++ src/components/Dashboard/Management/About.jsx | 7 +++---- .../Dashboard/Management/AppUpdates/AppUpdateProgress.jsx | 3 ++- src/components/Dashboard/context/AppUpdateContext.jsx | 8 ++++++-- src/components/Icons/SoftwareUpdateIcon.jsx | 8 ++++++++ 5 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 assets/icons/softwareupdateicon.svg create mode 100644 src/components/Icons/SoftwareUpdateIcon.jsx diff --git a/assets/icons/softwareupdateicon.svg b/assets/icons/softwareupdateicon.svg new file mode 100644 index 0000000..ebe6497 --- /dev/null +++ b/assets/icons/softwareupdateicon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/components/Dashboard/Management/About.jsx b/src/components/Dashboard/Management/About.jsx index b460d92..6c3257a 100644 --- a/src/components/Dashboard/Management/About.jsx +++ b/src/components/Dashboard/Management/About.jsx @@ -21,6 +21,7 @@ import { ElectronContext } from '../context/ElectronContext' import { AppUpdateContext } from '../context/AppUpdateContext' import { useMediaQuery } from 'react-responsive' import FarmControlAppIcon from '../../Logos/FarmControlAppIcon' +import SoftwareUpdateIcon from '../../Icons/SoftwareUpdateIcon' const { Title, Text, Link } = Typography const About = () => { @@ -53,7 +54,7 @@ const About = () => { actions.unshift( { label: 'Check for Updates', - icon: , + icon: , onClick: checkForUpdates }, { type: 'divider' } @@ -126,9 +127,7 @@ const About = () => { collapseKey='purchaseOrderStats' > - + diff --git a/src/components/Dashboard/Management/AppUpdates/AppUpdateProgress.jsx b/src/components/Dashboard/Management/AppUpdates/AppUpdateProgress.jsx index 8fe8d15..482c3f8 100644 --- a/src/components/Dashboard/Management/AppUpdates/AppUpdateProgress.jsx +++ b/src/components/Dashboard/Management/AppUpdates/AppUpdateProgress.jsx @@ -1,6 +1,6 @@ import PropTypes from 'prop-types' import { useState } from 'react' -import { Button, Flex, Modal, Progress, Typography, theme } from 'antd' +import { Button, Flex, Modal, Progress, Typography, theme, Divider } from 'antd' import CloudIcon from '../../../Icons/CloudIcon' import HostIcon from '../../../Icons/HostIcon' @@ -188,6 +188,7 @@ const AppUpdateProgress = ({ progress, update, onClose }) => { {update?.branch ? `${update.branch}` : 'unknown'}... </Text> + <Divider style={{ margin: '4px 0' }} /> <Flex vertical gap='middle'> <UpdateStage stage='download' diff --git a/src/components/Dashboard/context/AppUpdateContext.jsx b/src/components/Dashboard/context/AppUpdateContext.jsx index 91bf26f..dbcea60 100644 --- a/src/components/Dashboard/context/AppUpdateContext.jsx +++ b/src/components/Dashboard/context/AppUpdateContext.jsx @@ -7,7 +7,7 @@ import { useState } from 'react' import PropTypes from 'prop-types' -import { Button, Modal, Space, Typography } from 'antd' +import { Button, Modal, Space, Typography, Flex } from 'antd' import { LoadingOutlined } from '@ant-design/icons' import { version as appVersion } from '../../../../package.json' import { ApiServerContext } from './ApiServerContext' @@ -15,6 +15,7 @@ import { AuthContext } from './AuthContext' import { ElectronContext } from './ElectronContext' import NewAppUpdate from '../Management/AppUpdates/NewAppUpdate' import AppUpdateProgress from '../Management/AppUpdates/AppUpdateProgress' +import SoftwareUpdateIcon from '../../Icons/SoftwareUpdateIcon' const { Text } = Typography @@ -310,7 +311,10 @@ export const AppUpdateProvider = ({ children }) => { </Modal> <Modal title={ - installingUpdate ? 'Software Update' : 'Software Update Available' + <Flex align='center' gap='middle'> + <SoftwareUpdateIcon style={{ fontSize: 18 }} /> + {installingUpdate ? 'Software Update' : 'Software Update Available'} + </Flex> } open={updateModalOpen} footer={null} diff --git a/src/components/Icons/SoftwareUpdateIcon.jsx b/src/components/Icons/SoftwareUpdateIcon.jsx new file mode 100644 index 0000000..546a8e5 --- /dev/null +++ b/src/components/Icons/SoftwareUpdateIcon.jsx @@ -0,0 +1,8 @@ +import Icon from '@ant-design/icons' +import CustomIconSvg from '../../../assets/icons/softwareupdateicon.svg?react' + +const SoftwareUpdateIcon = (props) => ( + <Icon component={CustomIconSvg} {...props} /> +) + +export default SoftwareUpdateIcon