diff --git a/frontend/src/components/settings/git/status/OutgoingChanges.jsx b/frontend/src/components/settings/git/status/OutgoingChanges.jsx index aefbfda..c312d11 100644 --- a/frontend/src/components/settings/git/status/OutgoingChanges.jsx +++ b/frontend/src/components/settings/git/status/OutgoingChanges.jsx @@ -9,6 +9,7 @@ import { } from 'lucide-react'; import IconButton from '@ui/IconButton'; import ChangeTable from './ChangeTable'; +import PushTable from './PushTable'; const OutgoingChanges = ({ changes, @@ -37,15 +38,45 @@ const OutgoingChanges = ({ const totalOutgoingChanges = changes.length; const totalUnpushedCommits = unpushedFiles?.length || 0; + // If we only have committed changes waiting to be pushed + if (totalOutgoingChanges === 0 && hasUnpushedCommits) { + console.log('Unpushed Files:', unpushedFiles); + + return ( +
+
+

+ + Ready to Push ({totalUnpushedCommits}) +

+
+ } + tooltip='Push Changes' + className='bg-gray-700' + /> +
+
+
+ +
+
+ ); + } + + // Regular view for uncommitted changes return (

- - Outgoing Changes ( - {totalOutgoingChanges + totalUnpushedCommits}) - + Outgoing Changes ({totalOutgoingChanges})

- {hasUnpushedCommits && ( - } - tooltip={ -
-
Push Changes
- {unpushedFiles?.length > 0 && ( -
- {unpushedFiles.map( - (file, index) => ( -
- • {file.type}:{' '} - {file.name} -
- ) - )} -
- )} -
- } - className='bg-gray-700' - disabledTooltip='No changes to push' - /> - )} onRevertSelected(selectedChanges)} disabled={selectedChanges.length === 0} diff --git a/frontend/src/components/settings/git/status/PushRow.jsx b/frontend/src/components/settings/git/status/PushRow.jsx new file mode 100644 index 0000000..d342dde --- /dev/null +++ b/frontend/src/components/settings/git/status/PushRow.jsx @@ -0,0 +1,41 @@ +import React from 'react'; +import {GitCommit, Code, FileText, Settings, File} from 'lucide-react'; + +const PushRow = ({change}) => { + console.log('Push Row Change:', change); + + const getTypeIcon = type => { + switch (type) { + case 'Regex Pattern': + return ; + case 'Custom Format': + return ; + case 'Quality Profile': + return ; + default: + return ; + } + }; + + return ( + + +
+ + Committed +
+ + +
+ {getTypeIcon(change.type)} + {change.type} +
+ + + {change.name.replace('.yml', '')} + + + ); +}; + +export default PushRow; diff --git a/frontend/src/components/settings/git/status/PushTable.jsx b/frontend/src/components/settings/git/status/PushTable.jsx new file mode 100644 index 0000000..9c4ec2b --- /dev/null +++ b/frontend/src/components/settings/git/status/PushTable.jsx @@ -0,0 +1,29 @@ +import React from 'react'; +import PushRow from './PushRow'; + +const PushTable = ({changes}) => ( +
+ + + + + + + + + + {changes.map((change, index) => ( + + ))} + +
+ Status + + Type + + Name +
+
+); + +export default PushTable;