From 94d4ee0c8c0fb5eb347a4ea3674e551d122e8ced Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Tue, 27 Jan 2026 17:02:48 +0100 Subject: [PATCH] organize dialogs --- apps/web/src/app/editor/[project_id]/page.tsx | 2 +- apps/web/src/app/projects/page.tsx | 8 ++++---- .../editor/{ => dialogs}/delete-project-dialog.tsx | 6 +++--- .../components/editor/{ => dialogs}/migration-dialog.tsx | 0 .../editor/{ => dialogs}/project-info-dialog.tsx | 2 +- .../{ => editor/dialogs}/rename-project-dialog.tsx | 2 +- .../components/editor/{ => dialogs}/shortcuts-dialog.tsx | 4 ++-- apps/web/src/components/editor/editor-header.tsx | 6 +++--- 8 files changed, 15 insertions(+), 15 deletions(-) rename apps/web/src/components/editor/{ => dialogs}/delete-project-dialog.tsx (91%) rename apps/web/src/components/editor/{ => dialogs}/migration-dialog.tsx (100%) rename apps/web/src/components/editor/{ => dialogs}/project-info-dialog.tsx (97%) rename apps/web/src/components/{ => editor/dialogs}/rename-project-dialog.tsx (96%) rename apps/web/src/components/editor/{ => dialogs}/shortcuts-dialog.tsx (98%) diff --git a/apps/web/src/app/editor/[project_id]/page.tsx b/apps/web/src/app/editor/[project_id]/page.tsx index 5b02b7db..dbc10e8d 100644 --- a/apps/web/src/app/editor/[project_id]/page.tsx +++ b/apps/web/src/app/editor/[project_id]/page.tsx @@ -13,7 +13,7 @@ import { PreviewPanel } from "@/components/editor/preview-panel"; import { EditorHeader } from "@/components/editor/editor-header"; import { EditorProvider } from "@/components/providers/editor-provider"; import { Onboarding } from "@/components/editor/onboarding"; -import { MigrationDialog } from "@/components/editor/migration-dialog"; +import { MigrationDialog } from "@/components/editor/dialogs/migration-dialog"; import { usePanelStore } from "@/stores/panel-store"; export default function Editor() { diff --git a/apps/web/src/app/projects/page.tsx b/apps/web/src/app/projects/page.tsx index 6ae61d33..d58c3aac 100644 --- a/apps/web/src/app/projects/page.tsx +++ b/apps/web/src/app/projects/page.tsx @@ -6,7 +6,7 @@ import { useRouter } from "next/navigation"; import type { KeyboardEvent, MouseEvent } from "react"; import { useEffect, useState } from "react"; import { toast } from "sonner"; -import { MigrationDialog } from "@/components/editor/migration-dialog"; +import { MigrationDialog } from "@/components/editor/dialogs/migration-dialog"; import { Button } from "@/components/ui/button"; import { Card, CardContent } from "@/components/ui/card"; import { Checkbox } from "@/components/ui/checkbox"; @@ -53,9 +53,9 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; -import { DeleteProjectDialog } from "@/components/editor/delete-project-dialog"; -import { ProjectInfoDialog } from "@/components/editor/project-info-dialog"; -import { RenameProjectDialog } from "@/components/rename-project-dialog"; +import { DeleteProjectDialog } from "@/components/editor/dialogs/delete-project-dialog"; +import { ProjectInfoDialog } from "@/components/editor/dialogs/project-info-dialog"; +import { RenameProjectDialog } from "@/components/editor/dialogs/rename-project-dialog"; import { cn } from "@/utils/ui"; const formatProjectDuration = ({ diff --git a/apps/web/src/components/editor/delete-project-dialog.tsx b/apps/web/src/components/editor/dialogs/delete-project-dialog.tsx similarity index 91% rename from apps/web/src/components/editor/delete-project-dialog.tsx rename to apps/web/src/components/editor/dialogs/delete-project-dialog.tsx index ff97f91c..0086384e 100644 --- a/apps/web/src/components/editor/delete-project-dialog.tsx +++ b/apps/web/src/components/editor/dialogs/delete-project-dialog.tsx @@ -7,9 +7,9 @@ import { DialogHeader, DialogTitle, } from "@/components/ui/dialog"; -import { Alert, AlertDescription, AlertTitle } from "../ui/alert"; -import { Label } from "../ui/label"; -import { Input } from "../ui/input"; +import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; +import { Label } from "@/components/ui/label"; +import { Input } from "@/components/ui/input"; export function DeleteProjectDialog({ isOpen, diff --git a/apps/web/src/components/editor/migration-dialog.tsx b/apps/web/src/components/editor/dialogs/migration-dialog.tsx similarity index 100% rename from apps/web/src/components/editor/migration-dialog.tsx rename to apps/web/src/components/editor/dialogs/migration-dialog.tsx diff --git a/apps/web/src/components/editor/project-info-dialog.tsx b/apps/web/src/components/editor/dialogs/project-info-dialog.tsx similarity index 97% rename from apps/web/src/components/editor/project-info-dialog.tsx rename to apps/web/src/components/editor/dialogs/project-info-dialog.tsx index 4797d089..7b736b23 100644 --- a/apps/web/src/components/editor/project-info-dialog.tsx +++ b/apps/web/src/components/editor/dialogs/project-info-dialog.tsx @@ -9,7 +9,7 @@ import { import type { TProjectMetadata } from "@/types/project"; import { formatDate } from "@/utils/date"; import { formatTimeCode } from "@/lib/time"; -import { Button } from "../ui/button"; +import { Button } from "@/components/ui/button"; function InfoRow({ label, diff --git a/apps/web/src/components/rename-project-dialog.tsx b/apps/web/src/components/editor/dialogs/rename-project-dialog.tsx similarity index 96% rename from apps/web/src/components/rename-project-dialog.tsx rename to apps/web/src/components/editor/dialogs/rename-project-dialog.tsx index be5132fa..73024d71 100644 --- a/apps/web/src/components/rename-project-dialog.tsx +++ b/apps/web/src/components/editor/dialogs/rename-project-dialog.tsx @@ -9,7 +9,7 @@ import { } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; import { useState } from "react"; -import { Label } from "./ui/label"; +import { Label } from "@/components/ui/label"; export function RenameProjectDialog({ isOpen, diff --git a/apps/web/src/components/editor/shortcuts-dialog.tsx b/apps/web/src/components/editor/dialogs/shortcuts-dialog.tsx similarity index 98% rename from apps/web/src/components/editor/shortcuts-dialog.tsx rename to apps/web/src/components/editor/dialogs/shortcuts-dialog.tsx index 9d570094..565fe705 100644 --- a/apps/web/src/components/editor/shortcuts-dialog.tsx +++ b/apps/web/src/components/editor/dialogs/shortcuts-dialog.tsx @@ -7,7 +7,7 @@ import { useKeyboardShortcutsHelp, } from "@/hooks/use-keyboard-shortcuts-help"; import { useKeybindingsStore } from "@/stores/keybindings-store"; -import { Button } from "../ui/button"; +import { Button } from "@/components/ui/button"; import { Dialog, DialogBody, @@ -15,7 +15,7 @@ import { DialogFooter, DialogHeader, DialogTitle, -} from "../ui/dialog"; +} from "@/components/ui/dialog"; export function ShortcutsDialog({ isOpen, diff --git a/apps/web/src/components/editor/editor-header.tsx b/apps/web/src/components/editor/editor-header.tsx index 212ebfff..d74d78d7 100644 --- a/apps/web/src/components/editor/editor-header.tsx +++ b/apps/web/src/components/editor/editor-header.tsx @@ -11,8 +11,8 @@ import { DropdownMenuTrigger, } from "../ui/dropdown-menu"; import Link from "next/link"; -import { RenameProjectDialog } from "../rename-project-dialog"; -import { DeleteProjectDialog } from "./delete-project-dialog"; +import { RenameProjectDialog } from "./dialogs/rename-project-dialog"; +import { DeleteProjectDialog } from "./dialogs/delete-project-dialog"; import { useRouter } from "next/navigation"; import { FaDiscord } from "react-icons/fa6"; import { ExportButton } from "./export-button"; @@ -27,7 +27,7 @@ import { CommandIcon, } from "@hugeicons/core-free-icons"; import { HugeiconsIcon } from "@hugeicons/react"; -import { ShortcutsDialog } from "./shortcuts-dialog"; +import { ShortcutsDialog } from "./dialogs/shortcuts-dialog"; export function EditorHeader() { return (