From 1c28587bdf8fc595a89b28d4c0640ca6bcac750b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 24 Dec 2025 16:18:19 -0600 Subject: [PATCH] Put Push and Pull side-by-side --- src/components/git-sync/steps/SyncStep.tsx | 47 ++++++++++++++-------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/src/components/git-sync/steps/SyncStep.tsx b/src/components/git-sync/steps/SyncStep.tsx index 9ea2af6f..c78197bc 100644 --- a/src/components/git-sync/steps/SyncStep.tsx +++ b/src/components/git-sync/steps/SyncStep.tsx @@ -28,9 +28,11 @@ export function SyncStep({ projectId }: StepProps) { const queryClient = useQueryClient(); const [isSyncing, setIsSyncing] = useState(false); + const [currentOperation, setCurrentOperation] = useState(null); const [error, setError] = useState(null); const [copiedUrl, setCopiedUrl] = useState(false); const [syncSuccess, setSyncSuccess] = useState(false); + const [dropdownOpen, setDropdownOpen] = useState(false); const { data: gitStatus } = useGitStatus(projectId); const { settings } = useGitSettings(); @@ -56,6 +58,8 @@ export function SyncStep({ projectId }: StepProps) { if (!originRemote) return; setIsSyncing(true); + setDropdownOpen(false); + setCurrentOperation(operation); setError(null); setSyncSuccess(false); @@ -70,6 +74,7 @@ export function SyncStep({ projectId }: StepProps) { setError(message); } finally { setIsSyncing(false); + setCurrentOperation(null); } }, [originRemote]); @@ -267,11 +272,15 @@ export function SyncStep({ projectId }: StepProps) { {syncSuccess ? : } - Sync + + {isSyncing && currentOperation === 'pull' ? 'Pull' + : isSyncing && currentOperation === 'push' ? 'Push' + : 'Sync'} +
- + - - - - Pull - - - - Push - + +
+ + +