refactor: 支持LDAP登录

This commit is contained in:
caiyuchao
2025-08-22 19:12:04 +08:00
parent f7a37dd4b2
commit 41bc7d149e
6 changed files with 21 additions and 7 deletions

View File

@@ -179,6 +179,7 @@ const formSchema = computed((): VbenFormSchema[] => {
:show-forget-password="false" :show-forget-password="false"
:show-qrcode-login="false" :show-qrcode-login="false"
:show-third-party-login="false" :show-third-party-login="false"
:show-register="false"
@submit="handleLogin" @submit="handleLogin"
@third-login="handleThirdLogin" @third-login="handleThirdLogin"
/> />

View File

@@ -88,7 +88,13 @@ async function handleSubmit(values: Recordable<any>) {
</script> </script>
<template> <template>
<div class="mt-4 md:w-full lg:w-1/2 2xl:w-2/5"> <div>
<Form /> <a-alert
message="注意公司内部LDAP通用账号密码该密码和NAS、觅思的密码一致"
type="error"
/>
<div class="mt-4 md:w-full lg:w-1/2 2xl:w-2/5">
<Form />
</div>
</div> </div>
</template> </template>

View File

@@ -61,6 +61,11 @@ const [Modal, modalApi] = useVbenModal({
<template> <template>
<Modal title="重置密码"> <Modal title="重置密码">
<a-alert
message="注意公司内部LDAP通用账号密码该密码和NAS、觅思的密码一致"
type="error"
class="mb-2"
/>
<Form class="mx-4" /> <Form class="mx-4" />
</Modal> </Modal>
</template> </template>

View File

@@ -89,7 +89,9 @@ defineExpose({
</slot> </slot>
<template #desc> <template #desc>
<slot name="subTitle"> <slot name="subTitle">
{{ subTitle || $t('authentication.firstLoginResetPassword') }} <span class="text-sm text-red-500">
{{ subTitle || $t('authentication.firstLoginResetPassword') }}
</span>
</slot> </slot>
</template> </template>
</Title> </Title>

View File

@@ -4,7 +4,7 @@
"pageDesc": "", "pageDesc": "",
"loginSuccess": "Login Successful", "loginSuccess": "Login Successful",
"loginSuccessDesc": "Welcome Back", "loginSuccessDesc": "Welcome Back",
"loginSubtitle": "Enter your account details to manage your projects", "loginSubtitle": "Enter your LDAP account to manage your projects",
"selectAccount": "Quick Select Account", "selectAccount": "Quick Select Account",
"username": "Username", "username": "Username",
"password": "Password", "password": "Password",
@@ -33,7 +33,7 @@
"passwordStrength": "Use 8 or more characters with a mix of letters, numbers & symbols", "passwordStrength": "Use 8 or more characters with a mix of letters, numbers & symbols",
"forgetPassword": "Forget Password?", "forgetPassword": "Forget Password?",
"forgetPasswordSubtitle": "Enter your email and we'll send you instructions to reset your password", "forgetPasswordSubtitle": "Enter your email and we'll send you instructions to reset your password",
"firstLoginResetPassword": "Please reset your password on first login", "firstLoginResetPassword": "Please reset your LDAP password on first login (Note: This password is the same as NAS and MrDoc passwords)",
"resetPasswordSuccess": "Reset password success", "resetPasswordSuccess": "Reset password success",
"emailTip": "Please enter email", "emailTip": "Please enter email",
"emailValidErrorTip": "The email format you entered is incorrect", "emailValidErrorTip": "The email format you entered is incorrect",

View File

@@ -4,7 +4,7 @@
"pageDesc": "", "pageDesc": "",
"loginSuccess": "登录成功", "loginSuccess": "登录成功",
"loginSuccessDesc": "欢迎回来", "loginSuccessDesc": "欢迎回来",
"loginSubtitle": "请输入您的帐户信息以开始管理您的项目", "loginSubtitle": "请输入您的LDAP账号以开始管理您的项目",
"selectAccount": "快速选择账号", "selectAccount": "快速选择账号",
"username": "账号", "username": "账号",
"password": "密码", "password": "密码",
@@ -33,7 +33,7 @@
"passwordStrength": "使用 8 个或更多字符,混合字母、数字和符号", "passwordStrength": "使用 8 个或更多字符,混合字母、数字和符号",
"forgetPassword": "忘记密码?", "forgetPassword": "忘记密码?",
"forgetPasswordSubtitle": "输入您的电子邮件,我们将向您发送重置密码的连接", "forgetPasswordSubtitle": "输入您的电子邮件,我们将向您发送重置密码的连接",
"firstLoginResetPassword": "首次登录请重置密码", "firstLoginResetPassword": "首次登录请重置LDAP密码注意该密码和NAS、觅思的密码一致",
"resetPasswordSuccess": "重置密码成功", "resetPasswordSuccess": "重置密码成功",
"emailTip": "请输入邮箱", "emailTip": "请输入邮箱",
"emailValidErrorTip": "你输入的邮箱格式不正确", "emailValidErrorTip": "你输入的邮箱格式不正确",