Skip to content

Commit b708b3f

Browse files
author
qcloud
committed
更新登录页面、多语言配置和 Docker Compose 配置
1 parent ebe214c commit b708b3f

File tree

8 files changed

+62
-26
lines changed

8 files changed

+62
-26
lines changed

docker-compose.demo.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ services:
3535
- traefik-logs:/var/log/traefik
3636
labels:
3737
- "traefik.enable=true"
38-
# Traefik 仪表板
39-
- "traefik.http.routers.traefik.rule=Host(`www.deepmedsearch.cloud`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
38+
# Traefik 仪表板(仅匹配仪表板路径,不拦截应用 API)
39+
- "traefik.http.routers.traefik.rule=Host(`www.deepmedsearch.cloud`) && PathPrefix(`/dashboard`)"
4040
- "traefik.http.routers.traefik.entrypoints=websecure"
4141
- "traefik.http.routers.traefik.tls.certresolver=letsencrypt"
4242
- "traefik.http.routers.traefik.service=api@internal"
@@ -137,10 +137,10 @@ services:
137137

138138
queue-worker:
139139
# 使用腾讯云预构建镜像(无需本地编译)
140-
image: jpccr.ccs.tencentyun.com/deepmedsearch/deepmed-search-worker:latest
141-
# build:
142-
# context: .
143-
# dockerfile: Dockerfile.worker
140+
# image: jpccr.ccs.tencentyun.com/deepmedsearch/deepmed-search-worker:latest
141+
build:
142+
context: .
143+
dockerfile: Dockerfile.worker
144144
container_name: deepmed-queue-worker
145145
depends_on:
146146
- redis
@@ -177,10 +177,10 @@ services:
177177
# Next.js 主应用服务
178178
app:
179179
# 使用腾讯云预构建镜像(无需本地编译)
180-
image: jpccr.ccs.tencentyun.com/deepmedsearch/deepmed-search-app:latest
181-
# build:
182-
# context: .
183-
# dockerfile: Dockerfile
180+
# image: jpccr.ccs.tencentyun.com/deepmedsearch/deepmed-search-app:latest
181+
build:
182+
context: .
183+
dockerfile: Dockerfile
184184
container_name: deepmed-app
185185
# 端口配置说明:
186186
# - 生产环境:推荐只通过 Traefik (HTTPS) 访问,注释掉下面的 ports
@@ -255,10 +255,10 @@ services:
255255
start_period: 40s
256256
markitdown:
257257
# 使用腾讯云预构建镜像(无需本地编译)
258-
image: jpccr.ccs.tencentyun.com/deepmedsearch/deepmed-markitdown:latest
259-
# build:
260-
# context: ./docker/markitdown
261-
# dockerfile: Dockerfile
258+
# image: jpccr.ccs.tencentyun.com/deepmedsearch/deepmed-markitdown:latest
259+
build:
260+
context: ./docker/markitdown
261+
dockerfile: Dockerfile
262262
container_name: deepmed-markitdown
263263
restart: always
264264
ports:

src/app/login/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ const Login = () => {
146146
});
147147

148148
if (result?.error) {
149-
toast.error("登录失败", {
150-
description: "邮箱或密码错误",
149+
toast.error(t('errors.loginFailed'), {
150+
description: t('errors.loginFailedDescription'),
151151
});
152152
return;
153153
}
@@ -167,8 +167,8 @@ const Login = () => {
167167
}
168168

169169
// 显示成功提示
170-
toast.success("登录成功", {
171-
description: `欢迎回来,${user?.name || user?.email || ''}!`,
170+
toast.success(t('success.loginSuccess'), {
171+
description: t('success.loginSuccessDescription', { name: user?.name || user?.email || '' }),
172172
});
173173

174174
// 延迟跳转,让用户看到成功提示
@@ -177,8 +177,8 @@ const Login = () => {
177177
}, 800);
178178
} catch (error) {
179179
console.error('登录失败:', error);
180-
toast.error("登录失败", {
181-
description: "服务器错误,请稍后重试",
180+
toast.error(t('errors.loginFailed'), {
181+
description: t('errors.serverError'),
182182
});
183183
} finally {
184184
setLoading(false);

src/i18n/locales/ar.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,13 @@
352352
"signUp": "التسجيل"
353353
},
354354
"errors": {
355-
"loginFailed": "فشل تسجيل الدخول"
355+
"loginFailed": "فشل تسجيل الدخول",
356+
"loginFailedDescription": "البريد الإلكتروني أو كلمة المرور غير صحيحة",
357+
"serverError": "خطأ في الخادم، يرجى المحاولة مرة أخرى لاحقًا"
358+
},
359+
"success": {
360+
"loginSuccess": "تم تسجيل الدخول بنجاح",
361+
"loginSuccessDescription": "مرحبًا بعودتك، {{name}}!"
356362
},
357363
"login": "تسجيل الدخول",
358364
"loginDescription": "مرحبًا بعودتك! يرجى تسجيل الدخول إلى حسابك.",

src/i18n/locales/en.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,13 @@
463463
"signUp": "Sign Up"
464464
},
465465
"errors": {
466-
"loginFailed": "Login failed"
466+
"loginFailed": "Login failed",
467+
"loginFailedDescription": "Email or password is incorrect",
468+
"serverError": "Server error, please try again later"
469+
},
470+
"success": {
471+
"loginSuccess": "Login successful",
472+
"loginSuccessDescription": "Welcome back, {{name}}!"
467473
},
468474
"login": "Login",
469475
"loginDescription": "Welcome back! Please log in to your account.",

src/i18n/locales/fr.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,13 @@
352352
"signUp": "S'inscrire"
353353
},
354354
"errors": {
355-
"loginFailed": "Échec de la connexion"
355+
"loginFailed": "Échec de la connexion",
356+
"loginFailedDescription": "L'email ou le mot de passe est incorrect",
357+
"serverError": "Erreur serveur, veuillez réessayer plus tard"
358+
},
359+
"success": {
360+
"loginSuccess": "Connexion réussie",
361+
"loginSuccessDescription": "Bon retour, {{name}} !"
356362
},
357363
"login": "Connexion",
358364
"loginDescription": "Bienvenue ! Veuillez vous connecter à votre compte.",

src/i18n/locales/ja.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,13 @@
367367
"signUp": "登録"
368368
},
369369
"errors": {
370-
"loginFailed": "ログインに失敗しました"
370+
"loginFailed": "ログインに失敗しました",
371+
"loginFailedDescription": "メールアドレスまたはパスワードが正しくありません",
372+
"serverError": "サーバーエラーが発生しました。後でもう一度お試しください"
373+
},
374+
"success": {
375+
"loginSuccess": "ログイン成功",
376+
"loginSuccessDescription": "おかえりなさい、{{name}}さん!"
371377
},
372378
"login": "ログイン",
373379
"loginDescription": "おかえりなさい!アカウントにログインしてください。",

src/i18n/locales/ko.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,13 @@
367367
"signUp": "가입하기"
368368
},
369369
"errors": {
370-
"loginFailed": "로그인 실패"
370+
"loginFailed": "로그인 실패",
371+
"loginFailedDescription": "이메일 또는 비밀번호가 올바르지 않습니다",
372+
"serverError": "서버 오류가 발생했습니다. 나중에 다시 시도해 주세요"
373+
},
374+
"success": {
375+
"loginSuccess": "로그인 성공",
376+
"loginSuccessDescription": "돌아오신 것을 환영합니다, {{name}}님!"
371377
},
372378
"login": "로그인",
373379
"loginDescription": "돌아오신 것을 환영합니다! 계정에 로그인하세요.",

src/i18n/locales/zh.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,13 @@
462462
"signUp": "注册"
463463
},
464464
"errors": {
465-
"loginFailed": "登录失败"
465+
"loginFailed": "登录失败",
466+
"loginFailedDescription": "邮箱或密码错误",
467+
"serverError": "服务器错误,请稍后重试"
468+
},
469+
"success": {
470+
"loginSuccess": "登录成功",
471+
"loginSuccessDescription": "欢迎回来,{{name}}!"
466472
},
467473
"login": "登录",
468474
"loginDescription": "欢迎回来!请登录您的账号。",

0 commit comments

Comments
 (0)