mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
feat: 完成多个组件的国际化支持与文本替换
- 更新 AccountForm.vue 中的占位符文本为 i18n 语言包中的键 - 修改 ConfirmModal.vue 中的确认和取消按钮文本为 i18n 语言包中的键 - 更新 CustomDropdown.vue 中的占位符文本为 i18n 语言包中的键 - 修改 app.js 中的应用标题为英文版本 - 更新 router/index.js 中的日志输出为英文 - 在 accounts.js 和 apiKeys.js 中的错误处理信息中引入 i18n 键以提升多语言一致性 - 更新 dashboard.js 中的系统状态和错误日志为 i18n 键 - 在 DashboardView.vue 中的多个文本替换为 i18n 语言包中的键
This commit is contained in:
@@ -2,6 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { APP_CONFIG } from '@/config/app'
|
||||
import { showToast } from '@/utils/toast'
|
||||
|
||||
// 路由懒加载
|
||||
const LoginView = () => import('@/views/LoginView.vue')
|
||||
@@ -150,7 +151,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
const authStore = useAuthStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
console.log('路由导航:', {
|
||||
console.log('Router navigation:', {
|
||||
to: to.path,
|
||||
from: from.path,
|
||||
fullPath: to.fullPath,
|
||||
@@ -177,8 +178,6 @@ router.beforeEach(async (to, from, next) => {
|
||||
} catch (error) {
|
||||
// If the error is about disabled account, redirect to login with error
|
||||
if (error.message && error.message.includes('disabled')) {
|
||||
// Import showToast to display the error
|
||||
const { showToast } = await import('@/utils/toast')
|
||||
showToast(error.message, 'error')
|
||||
}
|
||||
return next('/user-login')
|
||||
|
||||
Reference in New Issue
Block a user