261015_01_ENH: 메인 화면·헤더 모바일 UI 개선
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
import { CalendarClock, LogOut, ZoomIn, ZoomOut } from "lucide-react";
|
||||
import { CalendarClock, LogOut, UserRound, ZoomIn, ZoomOut } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
import { KriHeader } from "@/components/layout/KriHeader";
|
||||
import type { TopMenuItem } from "@/config/menu.types";
|
||||
import type { LoginUser } from "@kri/common";
|
||||
@@ -54,13 +62,13 @@ export function AppHeader({
|
||||
<>
|
||||
<KriHeader
|
||||
logo={
|
||||
<div className="flex h-10 w-20 items-center justify-center">
|
||||
<div className="flex h-10 w-16 items-center justify-center sm:w-20">
|
||||
<Image
|
||||
src="/kri_logo.png"
|
||||
alt="KRI 로고"
|
||||
width={120}
|
||||
height={40}
|
||||
className="object-contain"
|
||||
className="h-full w-full object-contain"
|
||||
priority
|
||||
/>
|
||||
</div>
|
||||
@@ -73,7 +81,8 @@ export function AppHeader({
|
||||
onToggleMenu={onToggleMenu}
|
||||
onNavigate={(path) => {if(!isContactPage) onNavigate(path)}}
|
||||
className="border-gray-200 bg-white"
|
||||
innerClassName="h-16 px-4"
|
||||
// 모바일(sm 미만)은 헤더 폭이 좁아 로고와 우측 버튼이 겹치지 않도록 간격을 줄인다.
|
||||
innerClassName="h-16 gap-2 px-2 sm:gap-4 sm:px-4"
|
||||
center={
|
||||
showProjectTitle ? (
|
||||
<h1 className="ml-3 hidden truncate text-2xl font-bold lg:block" title={projectName}>{projectName}</h1>
|
||||
@@ -81,16 +90,16 @@ export function AppHeader({
|
||||
}
|
||||
right={
|
||||
<>
|
||||
<div className="flex items-center gap-1 border-r pr-4">
|
||||
<Button variant="ghost" size="icon" onClick={decreaseFontSize} title="폰트 작게">
|
||||
<div className="flex items-center gap-1 border-r pr-2 sm:pr-4">
|
||||
<Button variant="ghost" size="icon" className="size-8 sm:size-9" onClick={decreaseFontSize} title="폰트 작게">
|
||||
<ZoomOut className="h-4 w-4" />
|
||||
</Button>
|
||||
<span className="min-w-[3rem] text-center text-xs text-gray-500">{fontSize}px</span>
|
||||
<Button variant="ghost" size="icon" onClick={increaseFontSize} title="폰트 크게">
|
||||
<span className="min-w-6 text-center text-xs text-gray-500" title={`글자 크기 ${fontSize}px`}>{fontSize}</span>
|
||||
<Button variant="ghost" size="icon" className="size-8 sm:size-9" onClick={increaseFontSize} title="폰트 크게">
|
||||
<ZoomIn className="h-4 w-4" />
|
||||
</Button>
|
||||
</div>
|
||||
<Button variant="ghost" size="icon-lg" onClick={onOpenReserveSearch} title="예약 내역 조회">
|
||||
<Button variant="ghost" size="icon-lg" className="size-8 sm:size-10" onClick={onOpenReserveSearch} title="예약 내역 조회">
|
||||
<CalendarClock className="size-6" />
|
||||
</Button>
|
||||
<span className="hidden items-center gap-1.5 text-sm text-gray-600 sm:inline-flex">
|
||||
@@ -108,10 +117,30 @@ export function AppHeader({
|
||||
</span>
|
||||
) : null}
|
||||
</span>
|
||||
<Button variant="ghost" size="sm" className="gap-2" onClick={() => onNavigate("/logout")}>
|
||||
<Button variant="ghost" size="sm" className="hidden gap-2 sm:inline-flex" onClick={() => onNavigate("/logout")}>
|
||||
<LogOut className="h-4 w-4" />
|
||||
<span className="hidden sm:inline">로그아웃</span>
|
||||
<span>로그아웃</span>
|
||||
</Button>
|
||||
{/* 모바일(sm 미만)은 헤더 폭이 좁아 이름과 로그아웃을 사용자 메뉴로 묶는다. CTI는 모바일에서 사용하지 않아 표시하지 않는다. */}
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" size="icon" className="size-8 sm:hidden" title="사용자 메뉴" aria-label="사용자 메뉴">
|
||||
<UserRound className="h-4 w-4" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="end">
|
||||
{userInfo?.userName ? (
|
||||
<>
|
||||
<DropdownMenuLabel>{`${userInfo.userName} 님`}</DropdownMenuLabel>
|
||||
<DropdownMenuSeparator />
|
||||
</>
|
||||
) : null}
|
||||
<DropdownMenuItem onSelect={() => onNavigate("/logout")}>
|
||||
<LogOut className="h-4 w-4" />
|
||||
로그아웃
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user