From 52b0f03803a94689ccc08578b5538405c88be1f2 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 20 Oct 2025 11:15:54 +0000
Subject: (대표님) 데이터룸 관련: 워터마크, PDF 뷰어, 로그인
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/login/login-form.tsx | 52 +++++++++++++++++++++++++++--------------
 1 file changed, 34 insertions(+), 18 deletions(-)

(limited to 'components/login/login-form.tsx')

diff --git a/components/login/login-form.tsx b/components/login/login-form.tsx
index 751e45f4..bcfa1ec6 100644
--- a/components/login/login-form.tsx
+++ b/components/login/login-form.tsx
@@ -88,6 +88,17 @@ export function LoginForm() {
         message: undefined,
     });
 
+    // 호스트명 확인 상태 추가
+    const [isDataRoomHost, setIsDataRoomHost] = useState(false);
+
+    // 컴포넌트 마운트 시 호스트명 확인
+    useEffect(() => {
+        if (typeof window !== 'undefined') {
+            const hostname = window.location.hostname;
+            setIsDataRoomHost(hostname.includes('shidataroom'));
+        }
+    }, []);
+
     // // 영문 페이지에서 S-Gips 로그인 비활성화 시 기본 로그인 방법 설정
     // useEffect(() => {
     //     if (lng === 'en' && loginMethod === 'sgips') {
@@ -710,15 +721,17 @@ export function LoginForm() {
                 <div className="flex items-center justify-between">
                     <div className="flex items-center space-x-2">
                         <Ship className="w-4 h-4" />
-                        <span className="text-md font-bold">eVCP</span>
+                        <span className="text-md font-bold">{isDataRoomHost ? "Data Room" : "eVCP"}</span>
                     </div>
-                    <Link
-                        href="/partners/repository"
-                        className={cn(buttonVariants({ variant: "ghost" }))}
-                    >
-                        <InfoIcon className="w-4 h-4 mr-1" />
-                        {t('registerVendor')}
-                    </Link>
+                    {!isDataRoomHost && (
+                        <Link
+                            href="/partners/repository"
+                            className={cn(buttonVariants({ variant: "ghost" }))}
+                        >
+                            <InfoIcon className="w-4 h-4 mr-1" />
+                            {t('registerVendor')}
+                        </Link>
+                    )}
                 </div>
 
                 {/* Content section that occupies remaining space, centered vertically */}
@@ -730,9 +743,10 @@ export function LoginForm() {
                                 <div className="flex flex-col items-center text-center">
                                     {!showMfaForm ? (
                                         <>
-                                            <h1 className="text-2xl font-bold">{t('loginMessage')}</h1>
+                                       
+                                            <h1 className="text-2xl font-bold">{isDataRoomHost ? t('loginMessageDataRoom') :t('loginMessage')}</h1>
                                             <p className="text-xs text-muted-foreground mt-2">
-                                                {t('loginDescription')}
+                                                {isDataRoomHost?t('loginDescriptionDataRoom') :t('loginDescription')}
                                             </p>
                                         </>
                                     ) : (
@@ -918,14 +932,16 @@ export function LoginForm() {
                                         {/* Additional Links */}
                                         <div className="flex flex-col gap-2 text-center">
                                             {/* 신규 업체 등록은 항상 표시 */}
-                                            <Button
-                                                type="button"
-                                                variant="link"
-                                                className="text-blue-600 hover:text-blue-800 text-sm"
-                                                onClick={goToVendorRegistration}
-                                            >
-                                                {t('newVendor')}
-                                            </Button>
+                                            {!isDataRoomHost && (
+                                                <Button
+                                                    type="button"
+                                                    variant="link"
+                                                    className="text-blue-600 hover:text-blue-800 text-sm"
+                                                    onClick={goToVendorRegistration}
+                                                >
+                                                    {t('newVendor')}
+                                                </Button>
+                                            )}
 
                                             {/* 비밀번호 찾기는 패스워드 입력 단계에서만 표시 */}
                                             {loginMethod === 'username' && showPasswordInput && (
-- 
cgit v1.2.3

