diff --git a/src/components/Dashboard/Management/AppUpdates/NewAppUpdate.jsx b/src/components/Dashboard/Management/AppUpdates/NewAppUpdate.jsx index d5711d3..b2c0835 100644 --- a/src/components/Dashboard/Management/AppUpdates/NewAppUpdate.jsx +++ b/src/components/Dashboard/Management/AppUpdates/NewAppUpdate.jsx @@ -1,7 +1,9 @@ import PropTypes from 'prop-types' -import { Button, Flex, Typography, Card } from 'antd' +import { useState } from 'react' +import { Button, Flex, Typography, Card, Dropdown, Modal, Table } from 'antd' import TimeDisplay from '../../common/TimeDisplay' import FarmControlAppIcon from '../../../Logos/FarmControlAppIcon' +import EyeIcon from '../../../Icons/EyeIcon' const { Text, Title } = Typography @@ -9,56 +11,131 @@ const NewAppUpdate = ({ update, onCancel, onUpdate }) => { const artifacts = Array.isArray(update?.artifacts) ? update.artifacts : [] const primaryArtifact = artifacts.find((artifact) => artifact.url) + const [changesMenuOpen, setChangesMenuOpen] = useState(false) + + const columns = [ + { + title: 'Date', + dataIndex: 'date', + key: 'date', + width: 290, + render: (text, record) => { + return + } + }, + { + title: 'Author', + dataIndex: 'author', + key: 'author', + width: 180 + }, + { + title: 'Message', + dataIndex: 'message', + key: 'message', + width: 500 + } + ] + + const actionsMenu = { + items: [ + { + label: 'View Changes', + key: 'viewChanges', + icon: + } + ], + onClick: ({ key }) => { + if (key === 'viewChanges') { + setChangesMenuOpen(true) + } + } + } + return ( - - - A new Farm Control update is available. Would you like to update now? - - - - - - - {'Farm Control UI'} - - - - Version:{' '} - - {update?.version ? `v${update.version}` : 'Unknown'} - - - - Build Number:{' '} - - {update?.buildNumber ? `b${update.buildNumber}` : 'Unknown'} - - - - Branch: {update?.branch || 'Unknown'} - + <> + + + A new Farm Control update is available. Would you like to update now? + + + + + + + {'Farm Control UI'} + + + + + Version:{' '} + + {update?.version ? `v${update.version}` : 'Unknown'} + + + + Build Number:{' '} + + {update?.buildNumber + ? `b${update.buildNumber}` + : 'Unknown'} + + + + Branch: {update?.branch || 'Unknown'} + + + + + + - - + - - - Built at: - - - - - + + + Built at: + + + + + + + + setChangesMenuOpen(false)} + footer={null} + title='View Changes' + width={1200} + > +
+ + + - + ) }