summaryrefslogtreecommitdiff
path: root/components/login
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-10-20 11:15:54 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-10-20 11:15:54 +0000
commit52b0f03803a94689ccc08578b5538405c88be1f2 (patch)
treeae3c17182d65416c4737c67ad471a56863345bcd /components/login
parentbbf276882ec813beee465cec785fd2d31ff15a54 (diff)
(대표님) 데이터룸 관련: 워터마크, PDF 뷰어, 로그인
Diffstat (limited to 'components/login')
-rw-r--r--components/login/login-form.tsx52
1 files changed, 34 insertions, 18 deletions
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 && (