From e21adbaf000c5ca1c2f5211478cac6a2e7fbfdbd Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Fri, 7 Nov 2025 09:48:37 +0900
Subject: (김준회) SHI 로그인 화면도 비디오 배경화면 사용하도록 변경, 로그인
화면 비디오 배경 공통컴포넌트로 추출
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/login/login-form-shi.tsx | 24 ++---------
components/login/login-form.tsx | 62 ++---------------------------
components/login/video-background.tsx | 75 +++++++++++++++++++++++++++++++++++
3 files changed, 81 insertions(+), 80 deletions(-)
create mode 100644 components/login/video-background.tsx
(limited to 'components/login')
diff --git a/components/login/login-form-shi.tsx b/components/login/login-form-shi.tsx
index 0be6709a..fa27e0f3 100644
--- a/components/login/login-form-shi.tsx
+++ b/components/login/login-form-shi.tsx
@@ -20,9 +20,9 @@ import { sendOtpAction } from "@/lib/users/send-otp";
import { verifyTokenAction } from "@/lib/users/verifyToken";
import { buttonVariants } from "@/components/ui/button"
import Link from "next/link"
-import Image from 'next/image'; // 추가: Image 컴포넌트 import
import { KnoxSSOButton } from './saml-login-button'; // SAML 로그인 버튼 import
import Loading from "../common/loading/loading";
+import { VideoBackground } from "./video-background";
export function LoginFormSHI({
className,
@@ -363,26 +363,8 @@ export function LoginFormSHI({
- {/* Right BG 이미지 영역 - Image 컴포넌트로 수정 */}
-
- {/* Image 컴포넌트로 대체 */}
-
-
-
-
-
- “{t("blockquote")}”
- {/* */}
-
-
-
+ {/* Right BG 영상 영역 */}
+
)
}
\ No newline at end of file
diff --git a/components/login/login-form.tsx b/components/login/login-form.tsx
index 51d54531..70a1e775 100644
--- a/components/login/login-form.tsx
+++ b/components/login/login-form.tsx
@@ -21,17 +21,7 @@ import {
import { requestPasswordResetAction } from "@/lib/users/auth/partners-auth";
import { checkEmailAndStartAuth, resendEmailOtp } from "@/lib/users/auth/email-auth";
import Loading from "../common/loading/loading";
-
-// 배경 영상 목록
-const BACKGROUND_VIDEOS = [
- '/background-videos/1.yard.mp4',
- '/background-videos/2.SN2635_LNGC_CARDIFF.mp4',
- '/background-videos/3.SN2628_CONT_WAN HAI.mp4',
- '/background-videos/4.SN2612_LNGC_KGL.mp4',
- '/background-videos/5.SN2596_LNGC_JP MORGAN.mp4',
- '/background-videos/6.2235_FLNG_ENI_CORAL.mp4',
- '/background-videos/7.2126_FLNG_PETRONAS.mp4',
-];
+import { VideoBackground } from "./video-background";
export function LoginForm() {
const params = useParams() || {};
@@ -44,9 +34,6 @@ 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);
@@ -83,14 +70,11 @@ 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));
}
}, []);
@@ -168,11 +152,6 @@ export function LoginForm() {
router.push(`/${lng}/partners/repository`);
};
- // 비디오 종료 시 다음 비디오로 전환
- const handleVideoEnd = () => {
- setCurrentVideoIndex((prevIndex) => (prevIndex + 1) % BACKGROUND_VIDEOS.length);
- };
-
// MFA 카운트다운 효과
useEffect(() => {
if (mfaCountdown > 0) {
@@ -949,42 +928,7 @@ export function LoginForm() {
{/* Right BG 영상 영역 */}
-
-
-
- {/* 어두운 오버레이 */}
-
-
-
-
- “{t("blockquote")}”
-
-
- {/* 비디오 인디케이터 */}
-
- {BACKGROUND_VIDEOS.map((_, index) => (
-
setCurrentVideoIndex(index)}
- />
- ))}
-
-
+
)
}
\ No newline at end of file
diff --git a/components/login/video-background.tsx b/components/login/video-background.tsx
new file mode 100644
index 00000000..8d524996
--- /dev/null
+++ b/components/login/video-background.tsx
@@ -0,0 +1,75 @@
+'use client';
+
+import { useState, useEffect } from 'react';
+import { cn } from '@/lib/utils';
+
+// 배경 영상 목록
+const BACKGROUND_VIDEOS = [
+ '/background-videos/1.yard.mp4',
+ '/background-videos/2.SN2635_LNGC_CARDIFF.mp4',
+ '/background-videos/3.SN2628_CONT_WAN HAI.mp4',
+ '/background-videos/4.SN2612_LNGC_KGL.mp4',
+ '/background-videos/5.SN2596_LNGC_JP MORGAN.mp4',
+ '/background-videos/6.2235_FLNG_ENI_CORAL.mp4',
+ '/background-videos/7.2126_FLNG_PETRONAS.mp4',
+];
+
+interface VideoBackgroundProps {
+ quote: string;
+}
+
+export function VideoBackground({ quote }: VideoBackgroundProps) {
+ const [currentVideoIndex, setCurrentVideoIndex] = useState(0);
+
+ // 컴포넌트 마운트 시 랜덤한 비디오 선택
+ useEffect(() => {
+ if (typeof window !== 'undefined') {
+ setCurrentVideoIndex(Math.floor(Math.random() * BACKGROUND_VIDEOS.length));
+ }
+ }, []);
+
+ // 비디오 종료 시 다음 비디오로 전환
+ const handleVideoEnd = () => {
+ setCurrentVideoIndex((prevIndex) => (prevIndex + 1) % BACKGROUND_VIDEOS.length);
+ };
+
+ return (
+
+
+
+ {/* 어두운 오버레이 */}
+
+
+
+ {/* 비디오 인디케이터 */}
+
+ {BACKGROUND_VIDEOS.map((_, index) => (
+
setCurrentVideoIndex(index)}
+ />
+ ))}
+
+
+ );
+}
+
--
cgit v1.2.3