feat: PC 프로필에 POP 모드 전환 + PC전환 시 전체화면 해제

- PC UserDropdown에 "POP 모드" 메뉴 추가 (결재함↔로그아웃 사이)
- POP→PC 전환 시 전체화면 자동 해제
This commit is contained in:
SeongHyun Kim
2026-04-01 18:17:10 +09:00
parent 0232b1ed2c
commit f706556228
2 changed files with 9 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ import {
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { LogOut, User, FileCheck } from "lucide-react";
import { LogOut, User, FileCheck, Smartphone } from "lucide-react";
import { useRouter } from "next/navigation";
interface UserDropdownProps {
@@ -86,6 +86,10 @@ export function UserDropdown({ user, onProfileClick, onLogout }: UserDropdownPro
<FileCheck className="mr-2 h-4 w-4" />
<span></span>
</DropdownMenuItem>
<DropdownMenuItem onClick={() => router.push("/pop/home")}>
<Smartphone className="mr-2 h-4 w-4" />
<span>POP </span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem onClick={onLogout}>
<LogOut className="mr-2 h-4 w-4" />

View File

@@ -62,8 +62,11 @@ export function PopShell({ children, showBanner = true, title, showBack = false,
};
}, [profileOpen]);
const handlePcMode = () => {
const handlePcMode = async () => {
setProfileOpen(false);
if (document.fullscreenElement) {
try { await document.exitFullscreen(); } catch {}
}
router.push("/");
};