From 726064c4e26e2ba13ed7d8988526b61f76dfdcda Mon Sep 17 00:00:00 2001 From: sunlei Date: Wed, 24 Jun 2026 18:05:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DNapCat=20WebUI?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=B7=AF=E7=94=B1=E7=99=BD=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antdv-next/src/api/core/menu.spec.ts | 56 +++++++++++++++++++ apps/web-antdv-next/src/api/core/menu.ts | 2 + 2 files changed, 58 insertions(+) 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',