Switch ForcePullDialog to use a regular Dialog

This commit is contained in:
Alex Gleason committed 2025-12-24 17:21:02 -06:00
1 parent fe72549e2d
commit fba7d680f2
1 file changed
+27 -25
@@ -1,14 +1,13 @@
import { AlertTriangle } from 'lucide-react';
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from '@/components/ui/alert-dialog';
Dialog,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
} from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
interface ForcePullDialogProps {
open: boolean;
@@ -29,14 +28,14 @@ export function ForcePullDialog({
};
return (
<AlertDialog open={open} onOpenChange={onOpenChange}>
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle className="flex items-center gap-2">
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent>
<DialogHeader>
<DialogTitle className="flex items-center gap-2">
<AlertTriangle className="h-5 w-5 text-destructive" />
Force Pull - Discard Local Changes?
</AlertDialogTitle>
<AlertDialogDescription className="space-y-3">
</DialogTitle>
<DialogDescription className="space-y-3">
<p>
This will <strong className="text-destructive">completely reset your local repository</strong> to match the repository pushed to <strong>{remoteName}</strong>, permanently deleting all local commits and changes that don't exist on {remoteName}.
</p>
@@ -48,19 +47,22 @@ export function ForcePullDialog({
<li>All uncommitted changes</li>
</ul>
</div>
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>Cancel</AlertDialogCancel>
<AlertDialogAction
</DialogDescription>
</DialogHeader>
<DialogFooter>
<Button variant="outline" onClick={() => onOpenChange(false)}>
Cancel
</Button>
<Button
onClick={handleConfirm}
className="bg-destructive hover:bg-destructive/90"
variant="destructive"
className="gap-2"
>
<AlertTriangle className="h-4 w-4" />
Force Pull
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
);
}