-
-
-
-
-
-
-
-
-
+ {enabledAuthType.includes('social') &&
}
+ {enabledAuthType.includes('sso') &&
}
- <>
-
+ {(enabledAuthType.includes('code') || enabledAuthType.includes('password'))
+ &&
+
}
+ {enabledAuthType.includes('code') && authType === 'code' && <>
+
+ {enabledAuthType.includes('password') &&
{ updateAuthType('password') }}>
+ {t('login.usePassword')}
+
}
+ >}
+ {enabledAuthType.includes('password') && authType === 'password' && <>
+
+ {enabledAuthType.includes('code') &&
{ updateAuthType('code') }}>
+ {t('login.useVerificationCode')}
+
}
+ >}
-
- >
-
- {/* agree to our Terms and Privacy Policy. */}
{t('login.tosDesc')}
diff --git a/web/app/signin/page.tsx b/web/app/signin/page.tsx
index 5865f40e71..ea142d71d0 100644
--- a/web/app/signin/page.tsx
+++ b/web/app/signin/page.tsx
@@ -1,94 +1,16 @@
'use client'
-import React, { useEffect, useState } from 'react'
-import Script from 'next/script'
-import Loading from '../components/base/loading'
-import Forms from './forms'
-import Header from './_header'
-import style from './page.module.css'
-import UserSSOForm from './userSSOForm'
-import cn from '@/utils/classnames'
-import { IS_CE_EDITION } from '@/config'
+import OneMoreStep from './oneMoreStep'
+import NormalForm from './normalForm'
-import type { SystemFeatures } from '@/types/feature'
-import { defaultSystemFeatures } from '@/types/feature'
-import { getSystemFeatures } from '@/service/common'
+type Props = {
+ searchParams: { step?: 'next' }
+}
-const SignIn = () => {
- const [loading, setLoading] = useState
(true)
- const [systemFeatures, setSystemFeatures] = useState(defaultSystemFeatures)
+const SignIn = ({ searchParams }: Props) => {
+ if (searchParams?.step === 'next')
+ return
- useEffect(() => {
- getSystemFeatures().then((res) => {
- setSystemFeatures(res)
- }).finally(() => {
- setLoading(false)
- })
- }, [])
-
- return (
- <>
- {!IS_CE_EDITION && (
- <>
-
-
- >
- )}
-
-
-
-
- {loading && (
-
-
-
- )}
-
- {!loading && !systemFeatures.sso_enforced_for_signin && (
- <>
-
-
- © {new Date().getFullYear()} LangGenius, Inc. All rights reserved.
-
- >
- )}
-
- {!loading && systemFeatures.sso_enforced_for_signin && (
-
- )}
-
-
-
-
- >
- )
+ return
}
export default SignIn
diff --git a/web/i18n/zh-Hans/login.ts b/web/i18n/zh-Hans/login.ts
index bc19fecadb..d28b482c89 100644
--- a/web/i18n/zh-Hans/login.ts
+++ b/web/i18n/zh-Hans/login.ts
@@ -9,6 +9,10 @@ const translation = {
namePlaceholder: '输入用户名',
forget: '忘记密码?',
signBtn: '登录',
+ continueWithCode: '发送验证码',
+ usePassword: '使用密码登录',
+ useVerificationCode: '使用验证码登录',
+ or: '或',
installBtn: '设置',
setAdminAccount: '设置管理员账户',
setAdminAccountDesc: '管理员拥有的最大权限,可用于创建应用和管理 LLM 供应商等。',