feat(frontend): complete MCP plugin management UI

This commit is contained in:
2026-09-03 14:22:29 +08:00
parent 0bbff0090e
commit 0c392eebe4
14 changed files with 596 additions and 18 deletions
+5 -7
View File
@@ -48,7 +48,7 @@ const routes = [
path: '/extensions/plugins',
name: 'plugins',
component: () => import('@/features/plugins/PluginsView.vue'),
meta: { title: 'Plugin 管理', requiresVault: true },
meta: { title: 'Plugin 与 MCP', requiresVault: true },
},
{
path: '/themes',
@@ -69,17 +69,15 @@ const router = createRouter({
routes,
})
router.beforeEach((to, _from, next) => {
router.beforeEach((to) => {
const workspaceStore = useWorkspaceStore()
if (to.meta.requiresVault && !workspaceStore.hasVault) {
next({ path: '/' })
return
return { path: '/' }
}
if (to.path === '/' && workspaceStore.hasVault) {
next({ path: '/workspace' })
return
return { path: '/workspace' }
}
next()
return true
})
router.afterEach((to) => {