feat(WEB): 폴더블 기기(Galaxy Fold) 레이아웃 대응 및 CEO 대시보드 개선

- AuthenticatedLayout: visualViewport API 추가로 폴더블 기기 화면 전환 감지
- globals.css: CSS 변수(--app-width, --app-height) 및 dvw/dvh fallback 추가
- 모바일 레이아웃: h-screen → var(--app-height)로 변경
- CEO 대시보드 및 API 클라이언트 개선

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
byeongcheolryu
2026-01-09 11:00:39 +09:00
parent 0d539628f3
commit c4412295fa
9 changed files with 255 additions and 75 deletions

View File

@@ -116,14 +116,32 @@ export default function AuthenticatedLayout({ children }: AuthenticatedLayoutPro
}
}, [restartAfterAuth]);
// 모바일 감지
// 모바일 감지 + 폴더블 기기 대응 (Galaxy Fold 등)
useEffect(() => {
const checkScreenSize = () => {
setIsMobile(window.innerWidth < 768);
const updateViewport = () => {
// visualViewport API 우선 사용 (폴더블 기기에서 더 정확)
const width = window.visualViewport?.width ?? window.innerWidth;
const height = window.visualViewport?.height ?? window.innerHeight;
setIsMobile(width < 768);
// CSS 변수로 실제 viewport 크기 설정 (폴더블 기기 대응)
document.documentElement.style.setProperty('--app-width', `${width}px`);
document.documentElement.style.setProperty('--app-height', `${height}px`);
};
updateViewport();
// resize 이벤트
window.addEventListener('resize', updateViewport);
// visualViewport resize 이벤트 (폴더블 기기 화면 전환 감지)
window.visualViewport?.addEventListener('resize', updateViewport);
return () => {
window.removeEventListener('resize', updateViewport);
window.visualViewport?.removeEventListener('resize', updateViewport);
};
checkScreenSize();
window.addEventListener('resize', checkScreenSize);
return () => window.removeEventListener('resize', checkScreenSize);
}, []);
// 서버에서 받은 사용자 정보로 초기화
@@ -293,7 +311,7 @@ export default function AuthenticatedLayout({ children }: AuthenticatedLayoutPro
// 모바일 레이아웃
if (isMobile) {
return (
<div className="h-screen flex flex-col overflow-hidden">
<div className="flex flex-col overflow-hidden" style={{ height: 'var(--app-height)' }}>
{/* 모바일 헤더 - sam-design 스타일 */}
<header className="clean-glass sticky top-0 z-40 px-4 py-4 m-3 rounded-2xl clean-shadow">
<div className="flex items-center justify-between">