mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
Remove "Restore" option on current checkpoint
This commit is contained in:
parent
59ddaa9f00
commit
a0993a3ba0
2 changed files with 47 additions and 47 deletions
|
|
@ -46,20 +46,20 @@ export const CheckpointMenu = ({ ts, commitHash, currentCheckpointHash }: Checkp
|
|||
<Button variant="ghost" size="icon" onClick={onCheckpointDiff}>
|
||||
<span className="codicon codicon-diff-single" />
|
||||
</Button>
|
||||
{!isCurrent && (
|
||||
<Popover
|
||||
open={isOpen}
|
||||
onOpenChange={(open) => {
|
||||
setIsOpen(open)
|
||||
setIsConfirming(false)
|
||||
}}>
|
||||
<PopoverTrigger asChild>
|
||||
<Button variant="ghost" size="icon">
|
||||
<span className="codicon codicon-history" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent align="end" container={portalContainer}>
|
||||
<div className="flex flex-col gap-2">
|
||||
<Popover
|
||||
open={isOpen}
|
||||
onOpenChange={(open) => {
|
||||
setIsOpen(open)
|
||||
setIsConfirming(false)
|
||||
}}>
|
||||
<PopoverTrigger asChild>
|
||||
<Button variant="ghost" size="icon">
|
||||
<span className="codicon codicon-history" />
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent align="end" container={portalContainer}>
|
||||
<div className="flex flex-col gap-2">
|
||||
{!isCurrent && (
|
||||
<div className="flex flex-col gap-1 group hover:text-foreground">
|
||||
<Button variant="secondary" onClick={onPreview}>
|
||||
Restore Files
|
||||
|
|
@ -68,42 +68,42 @@ export const CheckpointMenu = ({ ts, commitHash, currentCheckpointHash }: Checkp
|
|||
Restores your project's files back to a snapshot taken at this point.
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="flex flex-col gap-1 group hover:text-foreground">
|
||||
<div className="flex flex-col gap-1 group hover:text-foreground">
|
||||
<div className="flex flex-col gap-1 group hover:text-foreground">
|
||||
{!isConfirming ? (
|
||||
<Button variant="secondary" onClick={() => setIsConfirming(true)}>
|
||||
Restore Files & Task
|
||||
{!isConfirming ? (
|
||||
<Button variant="secondary" onClick={() => setIsConfirming(true)}>
|
||||
Restore Files & Task
|
||||
</Button>
|
||||
) : (
|
||||
<>
|
||||
<Button variant="default" onClick={onRestore} className="grow">
|
||||
<div className="flex flex-row gap-1">
|
||||
<CheckIcon />
|
||||
<div>Confirm</div>
|
||||
</div>
|
||||
</Button>
|
||||
) : (
|
||||
<>
|
||||
<Button variant="default" onClick={onRestore} className="grow">
|
||||
<div className="flex flex-row gap-1">
|
||||
<CheckIcon />
|
||||
<div>Confirm</div>
|
||||
</div>
|
||||
</Button>
|
||||
<Button variant="secondary" onClick={() => setIsConfirming(false)}>
|
||||
<div className="flex flex-row gap-1">
|
||||
<Cross2Icon />
|
||||
<div>Cancel</div>
|
||||
</div>
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
{isConfirming ? (
|
||||
<div className="text-destructive font-bold">This action cannot be undone.</div>
|
||||
) : (
|
||||
<div className="text-muted transition-colors group-hover:text-foreground">
|
||||
Restores your project's files back to a snapshot taken at this point and
|
||||
deletes all messages after this point.
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<Button variant="secondary" onClick={() => setIsConfirming(false)}>
|
||||
<div className="flex flex-row gap-1">
|
||||
<Cross2Icon />
|
||||
<div>Cancel</div>
|
||||
</div>
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
{isConfirming ? (
|
||||
<div className="text-destructive font-bold">This action cannot be undone.</div>
|
||||
) : (
|
||||
<div className="text-muted transition-colors group-hover:text-foreground">
|
||||
Restores your project's files back to a snapshot taken at this point and deletes
|
||||
all messages after this point.
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
)}
|
||||
</div>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export const CheckpointSaved = (props: CheckpointSavedProps) => {
|
|||
|
||||
return (
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex gap-2">
|
||||
<span className="codicon codicon-git-commit text-blue-400" />
|
||||
<span className="font-bold">Checkpoint</span>
|
||||
{isCurrent && <span className="text-muted text-sm">Current</span>}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue