From df5a6201bdf8ff9edfc6429b918cf2fd2b245684 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Mon, 3 Nov 2025 17:21:09 +0900 Subject: (김준회) Revert: 로그인 영상 관련 커밋 revert 처리 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/login/login-form.tsx | 187 ++++++++++++++++++++++++---------------- 1 file changed, 112 insertions(+), 75 deletions(-) (limited to 'components/login') diff --git a/components/login/login-form.tsx b/components/login/login-form.tsx index fae5b8c9..51d54531 100644 --- a/components/login/login-form.tsx +++ b/components/login/login-form.tsx @@ -4,7 +4,7 @@ import { useState, useEffect } from "react"; import { cn } from "@/lib/utils" import { Button } from "@/components/ui/button" import { Input } from "@/components/ui/input" -import { InfoIcon, GlobeIcon, ChevronDownIcon, ArrowLeft } from "lucide-react"; +import { Ship, InfoIcon, GlobeIcon, ChevronDownIcon, ArrowLeft } from "lucide-react"; import { useToast } from "@/hooks/use-toast"; import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem } from "@/components/ui/dropdown-menu" import { useTranslation } from '@/i18n/client' @@ -21,7 +21,6 @@ import { import { requestPasswordResetAction } from "@/lib/users/auth/partners-auth"; import { checkEmailAndStartAuth, resendEmailOtp } from "@/lib/users/auth/email-auth"; import Loading from "../common/loading/loading"; -import { VideoBackground } from "@/components/common/video-background"; // 배경 영상 목록 const BACKGROUND_VIDEOS = [ @@ -45,6 +44,9 @@ export function LoginForm() { const { toast } = useToast(); const { data: session, status } = useSession(); + // 배경 영상 상태 + const [currentVideoIndex, setCurrentVideoIndex] = useState(0); + // 상태 관리 const [isFirstAuthLoading, setIsFirstAuthLoading] = useState(false); const [showForgotPassword, setShowForgotPassword] = useState(false); @@ -81,11 +83,14 @@ export function LoginForm() { // 호스트명 확인 상태 추가 const [isDataRoomHost, setIsDataRoomHost] = useState(false); - // 컴포넌트 마운트 시 호스트명 확인 + // 컴포넌트 마운트 시 호스트명 확인 및 랜덤 비디오 선택 useEffect(() => { if (typeof window !== 'undefined') { const hostname = window.location.hostname; setIsDataRoomHost(hostname.includes('shidataroom')); + + // 랜덤한 비디오 인덱스 선택 + setCurrentVideoIndex(Math.floor(Math.random() * BACKGROUND_VIDEOS.length)); } }, []); @@ -163,6 +168,11 @@ export function LoginForm() { router.push(`/${lng}/partners/repository`); }; + // 비디오 종료 시 다음 비디오로 전환 + const handleVideoEnd = () => { + setCurrentVideoIndex((prevIndex) => (prevIndex + 1) % BACKGROUND_VIDEOS.length); + }; + // MFA 카운트다운 효과 useEffect(() => { if (mfaCountdown > 0) { @@ -566,59 +576,47 @@ export function LoginForm() { } return ( -
- {/* 전체 화면 배경 영상 */} - - - {/* 로그인 카드 */} -
- {/* 불투명한 카드 배경 */} -
- {/* 헤더 */} -
-
-
- {/* */} - {isDataRoomHost ? "Data Room" : "eVCP"} -
- {!isDataRoomHost && ( - - - {t('registerVendor')} - - )} -
+
+ {/* Left Content */} +
+ {/* Top bar with Logo + eVCP (left) and "Request Vendor Repository" (right) */} +
+
+ + {isDataRoomHost ? "Data Room" : "eVCP"}
+ {!isDataRoomHost && ( + + + {t('registerVendor')} + + )} +
- {/* 로그인 폼 컨텐츠 */} -
-
- {/* Header */} -
+ {/* Content section that occupies remaining space, centered vertically */} +
+
+
+
+ {/* Header */} +
{!showMfaForm ? ( <> -

{isDataRoomHost ? t('loginMessageDataRoom') :t('loginMessage')}

+

{isDataRoomHost ? t('loginMessageDataRoom') :t('loginMessage')}

{isDataRoomHost?t('loginDescriptionDataRoom') :t('loginDescription')}

) : ( <> -
+
{mfaType === 'email' ? '📧' : '🔐'}
-

+

{mfaType === 'email' ? t('emailVerification') : t('smsVerification')}

@@ -676,7 +674,7 @@ export function LoginForm() { variant="ghost" size="sm" onClick={handleBackToLogin} - className="text-blue-600 hover:text-blue-800 dark:text-blue-400 dark:hover:text-blue-300" + className="text-blue-600 hover:text-blue-800" > {t('backToLogin')} @@ -684,9 +682,9 @@ export function LoginForm() {

{/* 이메일 표시 */} -
-

{t('loginEmail')}

-

{emailInput}

+
+

{t('loginEmail')}

+

{emailInput}

{/* 패스워드 입력 폼 */} @@ -724,7 +722,7 @@ export function LoginForm() {
{/* OTP 재전송 섹션 (SMS/Email) */} -
-

+
+

{t('resendCode')}

-

+

{mfaType === 'email' ? t('didNotReceiveEmail') : t('didNotReceiveCode')} @@ -799,7 +797,7 @@ export function LoginForm() {

-