mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
Revert "Merge pull request #424 from Wangnov/feat/i18n"
This reverts commit1d915d8327, reversing changes made to009f7c84f6.
This commit is contained in:
@@ -2,7 +2,6 @@ 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')
|
||||
@@ -151,7 +150,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
const authStore = useAuthStore()
|
||||
const userStore = useUserStore()
|
||||
|
||||
console.log('Router navigation:', {
|
||||
console.log('路由导航:', {
|
||||
to: to.path,
|
||||
from: from.path,
|
||||
fullPath: to.fullPath,
|
||||
@@ -178,6 +177,8 @@ 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