feat: PC 프로필에 POP 모드 전환 + PC전환 시 전체화면 해제
- PC UserDropdown에 "POP 모드" 메뉴 추가 (결재함↔로그아웃 사이) - POP→PC 전환 시 전체화면 자동 해제
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -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("/");
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user