diff --git a/apps/web-antdv-next/src/api/core/menu.spec.ts b/apps/web-antdv-next/src/api/core/menu.spec.ts index c770d6e..345e71a 100644 --- a/apps/web-antdv-next/src/api/core/menu.spec.ts +++ b/apps/web-antdv-next/src/api/core/menu.spec.ts @@ -37,6 +37,34 @@ describe('core menu api', () => { path: '/unsupported', component: '/unsupported/index', }, + { + name: 'QqBot', + path: '/qqbot', + children: [ + { + name: 'QqBotAccount', + path: '/qqbot/account', + component: '/qqbot/account/list', + children: [ + { + name: 'QqBotAccountWebUI', + authCode: 'QqBot:Account:WebUI', + type: 'button', + }, + ], + }, + { + name: 'QqBotAccountNapcatWebui', + path: '/qqbot/account/:accountId/napcat-webui', + component: '/qqbot/account/napcat-webui/index', + meta: { + activePath: '/qqbot/account', + hideInMenu: true, + title: 'NapCat WebUI', + }, + }, + ], + }, ]); const { getAllMenusApi } = await import('./menu'); @@ -61,6 +89,34 @@ describe('core menu api', () => { }, ], }, + { + name: 'QqBot', + path: '/qqbot', + children: [ + { + name: 'QqBotAccount', + path: '/qqbot/account', + component: '/qqbot/account/list', + children: [ + { + name: 'QqBotAccountWebUI', + authCode: 'QqBot:Account:WebUI', + type: 'button', + }, + ], + }, + { + name: 'QqBotAccountNapcatWebui', + path: '/qqbot/account/:accountId/napcat-webui', + component: '/qqbot/account/napcat-webui/index', + meta: { + activePath: '/qqbot/account', + hideInMenu: true, + title: 'NapCat WebUI', + }, + }, + ], + }, ]); }); }); diff --git a/apps/web-antdv-next/src/api/core/menu.ts b/apps/web-antdv-next/src/api/core/menu.ts index 03329d9..ab20d95 100644 --- a/apps/web-antdv-next/src/api/core/menu.ts +++ b/apps/web-antdv-next/src/api/core/menu.ts @@ -31,7 +31,9 @@ const SUPPORTED_ADMIN_MENU_NAMES = new Set([ 'QqBotAccountDelete', 'QqBotAccountEdit', 'QqBotAccountKick', + 'QqBotAccountNapcatWebui', 'QqBotAccountRefreshLogin', + 'QqBotAccountWebUI', 'QqBotCommand', 'QqBotCommandCreate', 'QqBotCommandDelete',