From 71f8504849002e9562d5431ac224d6914db02d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Fri, 30 Jan 2026 19:41:27 +0800 Subject: [PATCH] Refactor extension page layout and tab handling Improves the layout of the extension page by adjusting container heights and restructuring the header to better support responsive design. Moves the tab navigation to the header and displays only the selected extension page in the main content area, simplifying the rendering logic and improving user experience. --- .../src/pages/dashboard/extension.tsx | 127 +++++++++--------- 1 file changed, 63 insertions(+), 64 deletions(-) diff --git a/packages/napcat-webui-frontend/src/pages/dashboard/extension.tsx b/packages/napcat-webui-frontend/src/pages/dashboard/extension.tsx index dcab5677..5e72eb18 100644 --- a/packages/napcat-webui-frontend/src/pages/dashboard/extension.tsx +++ b/packages/napcat-webui-frontend/src/pages/dashboard/extension.tsx @@ -89,75 +89,74 @@ export default function ExtensionPage () { return ( <> 扩展页面 - NapCat WebUI -
+
-
-
- - 插件扩展页面 +
+
+
+ + 插件扩展页面 +
+
- + {extensionPages.length > 0 && ( + setSelectedTab(key as string)} + classNames={{ + tabList: 'bg-white/40 dark:bg-black/20 backdrop-blur-md', + cursor: 'bg-white/80 dark:bg-white/10 backdrop-blur-md shadow-sm', + panel: 'hidden', + }} + > + {tabs.map((tab) => ( + + {tab.icon && {tab.icon}} + {tab.title} + ({tab.pluginName}) +
+ } + /> + ))} + + )}
- {extensionPages.length === 0 && !loading - ? ( -
- -

暂无插件扩展页面

-

插件可以通过注册页面来扩展 WebUI 功能

-
- ) - : ( -
- setSelectedTab(key as string)} - classNames={{ - tabList: 'bg-white/40 dark:bg-black/20 backdrop-blur-md', - cursor: 'bg-white/80 dark:bg-white/10 backdrop-blur-md shadow-sm', - panel: 'flex-1 min-h-0 p-0', - }} - > - {tabs.map((tab) => ( - - {tab.icon && {tab.icon}} - {tab.title} - ({tab.pluginName}) -
- } - > -
- {iframeLoading && ( -
- -
- )} -