mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
feat: update delete project dialog
This commit is contained in:
@@ -508,6 +508,7 @@ function ProjectCard({
|
|||||||
isOpen={isDeleteDialogOpen}
|
isOpen={isDeleteDialogOpen}
|
||||||
onOpenChange={setIsDeleteDialogOpen}
|
onOpenChange={setIsDeleteDialogOpen}
|
||||||
onConfirm={handleDeleteProject}
|
onConfirm={handleDeleteProject}
|
||||||
|
projectName={project.name}
|
||||||
/>
|
/>
|
||||||
<RenameProjectDialog
|
<RenameProjectDialog
|
||||||
isOpen={isRenameDialogOpen}
|
isOpen={isRenameDialogOpen}
|
||||||
|
|||||||
@@ -7,15 +7,18 @@ import {
|
|||||||
DialogHeader,
|
DialogHeader,
|
||||||
DialogTitle,
|
DialogTitle,
|
||||||
} from "@/components/ui/dialog";
|
} from "@/components/ui/dialog";
|
||||||
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
export function DeleteProjectDialog({
|
export function DeleteProjectDialog({
|
||||||
isOpen,
|
isOpen,
|
||||||
onOpenChange,
|
onOpenChange,
|
||||||
onConfirm,
|
onConfirm,
|
||||||
|
projectName,
|
||||||
}: {
|
}: {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
onOpenChange: (open: boolean) => void;
|
onOpenChange: (open: boolean) => void;
|
||||||
onConfirm: () => void;
|
onConfirm: () => void;
|
||||||
|
projectName?: string;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<Dialog open={isOpen} onOpenChange={onOpenChange}>
|
<Dialog open={isOpen} onOpenChange={onOpenChange}>
|
||||||
@@ -26,7 +29,19 @@ export function DeleteProjectDialog({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>Delete Project</DialogTitle>
|
<DialogTitle>
|
||||||
|
{projectName ? (
|
||||||
|
<>
|
||||||
|
{"Delete '"}
|
||||||
|
<span className="inline-block max-w-[300px] truncate align-bottom">
|
||||||
|
{projectName}
|
||||||
|
</span>
|
||||||
|
{"'?"}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
"Delete Project?"
|
||||||
|
)}
|
||||||
|
</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
Are you sure you want to delete this project? This action cannot be
|
Are you sure you want to delete this project? This action cannot be
|
||||||
undone.
|
undone.
|
||||||
|
|||||||
Reference in New Issue
Block a user