Start simplifying 3-dots menu

This commit is contained in:
Alex Gleason committed 2025-09-22 00:02:52 -05:00
1 parent 16ee1235d3
commit 25f11dbe1d
3 files changed
+20 -134

No files matched your search

+16 -9
View File
@@ -1,7 +1,7 @@
import { useState, useEffect, useCallback } from 'react';
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from '@/components/ui/dialog';
import { Button } from '@/components/ui/button';
import { Badge } from '@/components/ui/badge';
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
import { History, GitCommit, RotateCcw, AlertTriangle, ChevronDown, ChevronUp } from 'lucide-react';
import { useGit } from '@/hooks/useGit';
@@ -291,11 +291,11 @@ ${commitsToRevert.map(c => {
<DialogContent className="max-w-4xl max-h-[80vh] overflow-hidden">
<DialogHeader>
<DialogTitle className="flex items-center gap-2">
<GitCommit className="h-5 w-5" />
Git History
<History className="h-5 w-5" />
Rollback
</DialogTitle>
<DialogDescription>
View the commit history for this project
Revert to an older commit
</DialogDescription>
</DialogHeader>
@@ -371,7 +371,18 @@ ${commitsToRevert.map(c => {
</div>
<div className="flex items-center gap-2 shrink-0">
{index > 0 && ( // Don't show rollback for the most recent commit
{index === 0 ? (
// Show "Current" for the most recent commit
<Button
variant="outline"
size="sm"
className="h-7 px-2 text-xs gap-1 cursor-default"
disabled
>
Current
</Button>
) : (
// Show rollback button for older commits
<AlertDialog>
<AlertDialogTrigger asChild>
<Button
@@ -429,10 +440,6 @@ ${commitsToRevert.map(c => {
</AlertDialogContent>
</AlertDialog>
)}
<Badge variant="secondary" className="text-xs font-mono">
{commit.oid.substring(0, 7)}
</Badge>
</div>
</div>
</div>