feat(frontend): complete MCP plugin management UI
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user