diff --git a/frontend/components/admin/dashboard/DashboardDesigner.tsx b/frontend/components/admin/dashboard/DashboardDesigner.tsx index 4cb5f94d..960583ce 100644 --- a/frontend/components/admin/dashboard/DashboardDesigner.tsx +++ b/frontend/components/admin/dashboard/DashboardDesigner.tsx @@ -8,7 +8,6 @@ import { ElementConfigModal } from "./ElementConfigModal"; import { ListWidgetConfigModal } from "./widgets/ListWidgetConfigModal"; import { YardWidgetConfigModal } from "./widgets/YardWidgetConfigModal"; import { DashboardSaveModal } from "./DashboardSaveModal"; -import { KeyboardShortcutsGuide } from "./KeyboardShortcutsGuide"; import { DashboardElement, ElementType, ElementSubtype } from "./types"; import { GRID_CONFIG, snapToGrid, snapSizeToGrid, calculateCellSize } from "./gridUtils"; import { Resolution, RESOLUTIONS, detectScreenResolution } from "./ResolutionSelector"; @@ -27,7 +26,7 @@ import { AlertDialogTitle, } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; -import { CheckCircle2, Keyboard } from "lucide-react"; +import { CheckCircle2 } from "lucide-react"; interface DashboardDesignerProps { dashboardId?: string; @@ -58,7 +57,6 @@ export default function DashboardDesigner({ dashboardId: initialDashboardId }: D const [dashboardDescription, setDashboardDescription] = useState(""); const [successModalOpen, setSuccessModalOpen] = useState(false); const [clearConfirmOpen, setClearConfirmOpen] = useState(false); - const [shortcutsGuideOpen, setShortcutsGuideOpen] = useState(false); // 클립보드 (복사/붙여넣기용) const [clipboard, setClipboard] = useState(null); @@ -337,7 +335,7 @@ export default function DashboardDesigner({ dashboardId: initialDashboardId }: D onDelete: handleDeleteSelected, onCopy: handleCopyElement, onPaste: handlePasteElement, - enabled: !saveModalOpen && !successModalOpen && !clearConfirmOpen && !shortcutsGuideOpen, + enabled: !saveModalOpen && !successModalOpen && !clearConfirmOpen, }); // 전체 삭제 확인 모달 열기 @@ -653,21 +651,6 @@ export default function DashboardDesigner({ dashboardId: initialDashboardId }: D - - {/* 키보드 단축키 가이드 모달 */} - setShortcutsGuideOpen(false)} /> - - {/* 키보드 단축키 도움말 플로팅 버튼 */} -
- -
); diff --git a/frontend/components/admin/dashboard/KeyboardShortcutsGuide.tsx b/frontend/components/admin/dashboard/KeyboardShortcutsGuide.tsx deleted file mode 100644 index 5de942b7..00000000 --- a/frontend/components/admin/dashboard/KeyboardShortcutsGuide.tsx +++ /dev/null @@ -1,98 +0,0 @@ -"use client"; - -import React from "react"; -import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@/components/ui/dialog"; -import { Keyboard } from "lucide-react"; - -interface KeyboardShortcutsGuideProps { - isOpen: boolean; - onClose: () => void; -} - -interface ShortcutItem { - keys: string[]; - description: string; - category: string; -} - -const shortcuts: ShortcutItem[] = [ - // 기본 작업 - { keys: ["Delete"], description: "선택한 요소 삭제", category: "기본 작업" }, - { keys: ["Ctrl", "C"], description: "요소 복사", category: "기본 작업" }, - { keys: ["Ctrl", "V"], description: "요소 붙여넣기", category: "기본 작업" }, - - // 실행 취소/재실행 (구현 예정) - { keys: ["Ctrl", "Z"], description: "실행 취소 (구현 예정)", category: "편집" }, - { keys: ["Ctrl", "Shift", "Z"], description: "재실행 (구현 예정)", category: "편집" }, -]; - -const KeyBadge = ({ keyName }: { keyName: string }) => ( - - {keyName} - -); - -export function KeyboardShortcutsGuide({ isOpen, onClose }: KeyboardShortcutsGuideProps) { - // 카테고리별로 그룹화 - const groupedShortcuts = shortcuts.reduce( - (acc, shortcut) => { - if (!acc[shortcut.category]) { - acc[shortcut.category] = []; - } - acc[shortcut.category].push(shortcut); - return acc; - }, - {} as Record, - ); - - // Mac OS 감지 - const isMac = typeof navigator !== "undefined" && navigator.platform.toUpperCase().indexOf("MAC") >= 0; - - return ( - - - -
- - 키보드 단축키 -
- - 대시보드 편집을 더 빠르게 할 수 있는 단축키 목록입니다 - {isMac && " (Mac에서는 Ctrl 대신 Cmd 키를 사용하세요)"} - -
- -
- {Object.entries(groupedShortcuts).map(([category, categoryShortcuts]) => ( -
-

{category}

-
- {categoryShortcuts.map((shortcut, index) => ( -
- {shortcut.description} -
- {shortcut.keys.map((key, keyIndex) => ( - - - {keyIndex < shortcut.keys.length - 1 && +} - - ))} -
-
- ))} -
-
- ))} -
- -
-

💡 팁

-

입력 필드나 모달에서는 단축키가 자동으로 비활성화됩니다.

-
-
-
- ); -}