mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-09 01:36:57 +08:00
perf: X-Pack menu
This commit is contained in:
@@ -168,5 +168,5 @@ const router = createRouter({
|
||||
},
|
||||
],
|
||||
})
|
||||
watchRouter(router)
|
||||
await watchRouter(router)
|
||||
export default router
|
||||
|
||||
@@ -6,9 +6,10 @@ const userStore = useUserStore()
|
||||
const { wsCache } = useCache()
|
||||
const whiteList = ['/login']
|
||||
const assistantWhiteList = ['/assistant']
|
||||
export const watchRouter = (router: any) => {
|
||||
export const watchRouter = async (router: any) => {
|
||||
await loadXpackStatic()
|
||||
LicenseGenerator.generateRouters(router)
|
||||
router.beforeEach(async (to: any, from: any, next: any) => {
|
||||
await loadXpackStatic()
|
||||
if (assistantWhiteList.includes(to.path)) {
|
||||
next()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user