diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-20 11:31:17 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-20 11:31:17 +0200 |
| commit | 3e89d2998588f8e35c524e523ba2ee853f0f6475 (patch) | |
| tree | 57221f96c1259b3b07e3ddf8c1adefc502b9d8eb /apps/web/src/components/editor/dialogs/delete-project-dialog.tsx | |
| parent | 729d10592f4e802f91c555c309ff3ba4b119f843 (diff) | |
| download | opencut-3e89d2998588f8e35c524e523ba2ee853f0f6475.tar.gz | |
refactor: restructure files to their domains, new preview overlay system, and dep graph
Diffstat (limited to 'apps/web/src/components/editor/dialogs/delete-project-dialog.tsx')
| -rw-r--r-- | apps/web/src/components/editor/dialogs/delete-project-dialog.tsx | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/apps/web/src/components/editor/dialogs/delete-project-dialog.tsx b/apps/web/src/components/editor/dialogs/delete-project-dialog.tsx deleted file mode 100644 index 0086384e..00000000 --- a/apps/web/src/components/editor/dialogs/delete-project-dialog.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { Button } from "@/components/ui/button"; -import { - Dialog, - DialogBody, - DialogContent, - DialogFooter, - DialogHeader, - DialogTitle, -} from "@/components/ui/dialog"; -import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; -import { Label } from "@/components/ui/label"; -import { Input } from "@/components/ui/input"; - -export function DeleteProjectDialog({ - isOpen, - onOpenChange, - onConfirm, - projectNames, -}: { - isOpen: boolean; - onOpenChange: (open: boolean) => void; - onConfirm: () => void; - projectNames: string[]; -}) { - const count = projectNames.length; - const isSingle = count === 1; - const singleName = isSingle ? projectNames[0] : null; - - return ( - <Dialog open={isOpen} onOpenChange={onOpenChange}> - <DialogContent - onOpenAutoFocus={(event) => { - event.preventDefault(); - event.stopPropagation(); - }} - > - <DialogHeader> - <DialogTitle> - {singleName ? ( - <> - {"Delete '"} - <span className="inline-block max-w-[300px] truncate align-bottom"> - {singleName} - </span> - {"'?"} - </> - ) : ( - `Delete ${count} projects?` - )} - </DialogTitle> - </DialogHeader> - <DialogBody> - <Alert variant="destructive"> - <AlertTitle>Warning</AlertTitle> - <AlertDescription> - This will permanently delete{" "} - {singleName ? `"${singleName}"` : `${count} projects`} and all - associated files. - </AlertDescription> - </Alert> - <div className="flex flex-col gap-3"> - <Label className="text-xs font-semibold text-slate-500"> - Type "DELETE" to confirm - </Label> - <Input - type="text" - placeholder="DELETE" - size="lg" - variant="destructive" - /> - </div> - </DialogBody> - <DialogFooter> - <Button variant="outline" onClick={() => onOpenChange(false)}> - Cancel - </Button> - <Button variant="destructive" onClick={onConfirm}> - Delete project - </Button> - </DialogFooter> - </DialogContent> - </Dialog> - ); -} |
