chore: 修复登录页与前端开发服务器配置

- vite dev server 端口改为 5000 并启用 strictPort,端口冲突时拒绝启动
- AGENTS.md 更新前端目录结构说明(移除已删除的 ERB/enterprise 目录)及端口文档
- v3 登录页精简:移除 useBranding/globalConfig 依赖,去掉忘记密码链接
- 中文登录表单翻译优化(Email → 电子邮件)
This commit is contained in:
Rogee
2026-07-29 14:49:20 +08:00
parent 83386dff75
commit 7ed53bec47
4 changed files with 19 additions and 30 deletions
@@ -2,8 +2,8 @@
"LOGIN": {
"TITLE": "登录到Chatwoot",
"EMAIL": {
"LABEL": "Email",
"PLACEHOLDER": "实例 {'@'}companyname.com",
"LABEL": "电子邮件",
"PLACEHOLDER": "电子邮件",
"ERROR": "请输入一个有效的电子邮件"
},
"PASSWORD": {
@@ -1,13 +1,11 @@
<script>
// utils and composables
import { login } from '../../api/auth';
import { mapGetters } from 'vuex';
import { useAlert } from 'dashboard/composables';
import { required, email } from '@vuelidate/validators';
import { useVuelidate } from '@vuelidate/core';
import { SESSION_STORAGE_KEYS } from 'dashboard/constants/sessionStorage';
import SessionStorage from 'shared/helpers/sessionStorage';
import { useBranding } from 'shared/composables/useBranding';
// components
import SimpleDivider from '../../components/Divider/SimpleDivider.vue';
@@ -46,9 +44,7 @@ export default {
authError: { type: String, default: '' },
},
setup() {
const { replaceInstallationName } = useBranding();
return {
replaceInstallationName,
v$: useVuelidate(),
};
},
@@ -84,7 +80,6 @@ export default {
};
},
computed: {
...mapGetters({ globalConfig: 'globalConfig/get' }),
allowedLoginMethods() {
return window.chatwootConfig.allowedLoginMethods || ['email'];
},
@@ -227,14 +222,8 @@ export default {
<template>
<main
class="flex flex-col w-full min-h-screen py-20 bg-n-brand/5 dark:bg-n-background sm:px-6 lg:px-8"
class="flex flex-col items-center justify-center w-full min-h-screen bg-n-brand/5 dark:bg-n-background sm:px-6 lg:px-8"
>
<section class="max-w-5xl mx-auto">
<h2 class="text-3xl font-medium text-center text-n-slate-12">
{{ replaceInstallationName($t('LOGIN.TITLE')) }}
</h2>
</section>
<!-- MFA Verification Section -->
<section v-if="mfaRequired" class="mt-11">
<MfaVerification
@@ -300,17 +289,7 @@ export default {
:placeholder="$t('LOGIN.PASSWORD.PLACEHOLDER')"
:has-error="v$.credentials.password.$error"
@input="v$.credentials.password.$touch"
>
<p v-if="!globalConfig.disableUserProfileUpdate">
<router-link
to="auth/reset/password"
class="text-sm text-link"
tabindex="4"
>
{{ $t('LOGIN.FORGOT_PASSWORD') }}
</router-link>
</p>
</FormInput>
/>
<NextButton
lg
type="submit"