refactor(chat + workspace): chat和workspace重构,子路由、懒加载等

This commit is contained in:
sophie committed 2026-06-10 16:39:05 +08:00
1 parent 0a647a0b79
commit 1f1f7236b0
57 files changed
+4356 -3798

No files matched your search

+8 -3
View File
@@ -20,7 +20,7 @@ export function setupRouterGuards(router: Router): void {
if (to.matched.some((r) => r.meta.requiresAdmin)) {
if (!auth.isAdmin) {
next('/workspace');
next('/workspace/applications');
return;
}
}
@@ -30,12 +30,17 @@ export function setupRouterGuards(router: Router): void {
next(`/chat/${DEFAULT_CHAT_AGENT_ID}`);
return;
}
next('/workspace');
next('/login');
return;
}
if (to.path === '/login' && auth.isLoggedIn) {
next('/workspace/applications');
return;
}
if (!auth.isLoggedIn && !isPublicPath(to.path)) {
next('/workspace');
next('/login');
return;
}