From e53bdd15ef3504391bc3166d318961812f3fdd71 Mon Sep 17 00:00:00 2001 From: leeheejin Date: Fri, 17 Oct 2025 12:04:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4=EB=91=90=EA=B0=9C?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0,=20=ED=97=A4=EB=8D=94?= =?UTF-8?q?=20=EC=97=86=EC=95=A0=EA=B8=B0=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(main)/dashboard/[dashboardId]/page.tsx | 26 +++++---- .../admin/dashboard/DashboardDesigner.tsx | 3 +- .../components/dashboard/DashboardViewer.tsx | 3 +- .../dashboard/widgets/CalculatorWidget.tsx | 53 ++++++++++++++++++- frontend/components/layout/AppLayout.tsx | 2 +- 5 files changed, 69 insertions(+), 18 deletions(-) diff --git a/frontend/app/(main)/dashboard/[dashboardId]/page.tsx b/frontend/app/(main)/dashboard/[dashboardId]/page.tsx index 6f5af7ba..f8af0d0f 100644 --- a/frontend/app/(main)/dashboard/[dashboardId]/page.tsx +++ b/frontend/app/(main)/dashboard/[dashboardId]/page.tsx @@ -105,8 +105,8 @@ export default function DashboardViewPage({ params }: DashboardViewPageProps) { return (
- {/* 대시보드 헤더 */} -
+ {/* 대시보드 헤더 - 보기 모드에서는 숨김 */} + {/*

{dashboard.title}

@@ -114,7 +114,7 @@ export default function DashboardViewPage({ params }: DashboardViewPageProps) {
- {/* 새로고침 버튼 */} + {/* 새로고침 버튼 *\/} - {/* 편집 버튼 */} + {/* 편집 버튼 *\/}
- {/* 메타 정보 */} + {/* 메타 정보 *\/}
생성: {new Date(dashboard.createdAt).toLocaleString()} 수정: {new Date(dashboard.updatedAt).toLocaleString()} 요소: {dashboard.elements.length}개
-
+
*/} {/* 대시보드 뷰어 */} -
- -
+
); } diff --git a/frontend/components/admin/dashboard/DashboardDesigner.tsx b/frontend/components/admin/dashboard/DashboardDesigner.tsx index 8ab08710..0f35ede6 100644 --- a/frontend/components/admin/dashboard/DashboardDesigner.tsx +++ b/frontend/components/admin/dashboard/DashboardDesigner.tsx @@ -470,7 +470,8 @@ export default function DashboardDesigner({ dashboardId: initialDashboardId }: D /> {/* 캔버스 영역 - 해상도에 따른 크기, 중앙 정렬 */} -
+ {/* overflow-auto 제거 - 외부 페이지 스크롤 사용 */} +
-
+ {/* overflow-auto 제거 - 외부 페이지 스크롤 사용 */} +
{/* 고정 크기 캔버스 (편집 화면과 동일한 레이아웃) */}
{ + const handleKeyDown = (event: KeyboardEvent) => { + const key = event.key; + + // 숫자 키 (0-9) + if (/^[0-9]$/.test(key)) { + event.preventDefault(); + handleNumber(key); + } + // 연산자 키 + else if (key === '+' || key === '-' || key === '*' || key === '/') { + event.preventDefault(); + handleOperation(key); + } + // 소수점 + else if (key === '.') { + event.preventDefault(); + handleDecimal(); + } + // Enter 또는 = (계산) + else if (key === 'Enter' || key === '=') { + event.preventDefault(); + handleEquals(); + } + // Escape 또는 c (초기화) + else if (key === 'Escape' || key.toLowerCase() === 'c') { + event.preventDefault(); + handleClear(); + } + // Backspace (지우기) + else if (key === 'Backspace') { + event.preventDefault(); + handleBackspace(); + } + // % (퍼센트) + else if (key === '%') { + event.preventDefault(); + handlePercent(); + } + }; + + // 이벤트 리스너 등록 + window.addEventListener('keydown', handleKeyDown); + + // 클린업 + return () => { + window.removeEventListener('keydown', handleKeyDown); + }; + }, [display, previousValue, operation, waitingForOperand]); + return (
diff --git a/frontend/components/layout/AppLayout.tsx b/frontend/components/layout/AppLayout.tsx index 3fee965f..b6e0139b 100644 --- a/frontend/components/layout/AppLayout.tsx +++ b/frontend/components/layout/AppLayout.tsx @@ -457,7 +457,7 @@ function AppLayoutInner({ children }: AppLayoutProps) { {/* 가운데 컨텐츠 영역 - overflow 문제 해결 */} -
{children}
+
{children}
{/* 프로필 수정 모달 */}