mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
fix: remove duplicate nested div wrapper in CheckpointMenu component
This commit is contained in:
parent
5b11885afb
commit
6646f2b254
1 changed files with 36 additions and 38 deletions
|
|
@ -101,46 +101,44 @@ export const CheckpointMenu = ({
|
|||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1 group hover:text-foreground">
|
||||
<div className="flex flex-col gap-1 group hover:text-foreground">
|
||||
{!isConfirming ? (
|
||||
{!isConfirming ? (
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() => setIsConfirming(true)}
|
||||
data-testid="restore-files-and-task-btn">
|
||||
{t("chat:checkpoint.menu.restoreFilesAndTask")}
|
||||
</Button>
|
||||
) : (
|
||||
<>
|
||||
<Button
|
||||
variant="secondary"
|
||||
onClick={() => setIsConfirming(true)}
|
||||
data-testid="restore-files-and-task-btn">
|
||||
{t("chat:checkpoint.menu.restoreFilesAndTask")}
|
||||
variant="default"
|
||||
onClick={onRestore}
|
||||
className="grow"
|
||||
data-testid="confirm-restore-btn">
|
||||
<div className="flex flex-row gap-1">
|
||||
<CheckIcon />
|
||||
<div>{t("chat:checkpoint.menu.confirm")}</div>
|
||||
</div>
|
||||
</Button>
|
||||
) : (
|
||||
<>
|
||||
<Button
|
||||
variant="default"
|
||||
onClick={onRestore}
|
||||
className="grow"
|
||||
data-testid="confirm-restore-btn">
|
||||
<div className="flex flex-row gap-1">
|
||||
<CheckIcon />
|
||||
<div>{t("chat:checkpoint.menu.confirm")}</div>
|
||||
</div>
|
||||
</Button>
|
||||
<Button variant="secondary" onClick={() => setIsConfirming(false)}>
|
||||
<div className="flex flex-row gap-1">
|
||||
<Cross2Icon />
|
||||
<div>{t("chat:checkpoint.menu.cancel")}</div>
|
||||
</div>
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
{isConfirming ? (
|
||||
<div
|
||||
data-testid="checkpoint-confirm-warning"
|
||||
className="text-destructive font-bold">
|
||||
{t("chat:checkpoint.menu.cannotUndo")}
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-muted transition-colors group-hover:text-foreground">
|
||||
{t("chat:checkpoint.menu.restoreFilesAndTaskDescription")}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<Button variant="secondary" onClick={() => setIsConfirming(false)}>
|
||||
<div className="flex flex-row gap-1">
|
||||
<Cross2Icon />
|
||||
<div>{t("chat:checkpoint.menu.cancel")}</div>
|
||||
</div>
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
{isConfirming ? (
|
||||
<div
|
||||
data-testid="checkpoint-confirm-warning"
|
||||
className="text-destructive font-bold">
|
||||
{t("chat:checkpoint.menu.cannotUndo")}
|
||||
</div>
|
||||
) : (
|
||||
<div className="text-muted transition-colors group-hover:text-foreground">
|
||||
{t("chat:checkpoint.menu.restoreFilesAndTaskDescription")}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue