From c3b29f1ee6777f8b04df9c8576cf5f5d68782d42 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: Tue, 3 Feb 2026 18:58:40 +0800 Subject: [PATCH] Improve extension tab UI and add /plugin proxy Update dashboard extension UI to prevent title overflow: add truncate and max-width to the tab title, include the plugin name in the title tooltip, and hide the plugin-name label on small screens (visible from md+). Also add a '/plugin' proxy entry to the Vite dev server config so plugin requests are forwarded to the backend debug URL. --- .../napcat-webui-frontend/src/pages/dashboard/extension.tsx | 6 +++--- packages/napcat-webui-frontend/vite.config.ts | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/napcat-webui-frontend/src/pages/dashboard/extension.tsx b/packages/napcat-webui-frontend/src/pages/dashboard/extension.tsx index e61f1de1..a1775d83 100644 --- a/packages/napcat-webui-frontend/src/pages/dashboard/extension.tsx +++ b/packages/napcat-webui-frontend/src/pages/dashboard/extension.tsx @@ -132,8 +132,8 @@ export default function ExtensionPage () {
{tab.icon && {tab.icon}} { e.stopPropagation(); openInNewWindow(tab.pluginId, tab.path); @@ -141,7 +141,7 @@ export default function ExtensionPage () { > {tab.title} - ({tab.pluginName}) + ({tab.pluginName})
} /> diff --git a/packages/napcat-webui-frontend/vite.config.ts b/packages/napcat-webui-frontend/vite.config.ts index 6f8ef45d..754d94c6 100644 --- a/packages/napcat-webui-frontend/vite.config.ts +++ b/packages/napcat-webui-frontend/vite.config.ts @@ -30,6 +30,7 @@ export default defineConfig(({ mode }) => { }, '/api': backendDebugUrl, '/files': backendDebugUrl, + '/plugin': backendDebugUrl, '/webui/fonts/CustomFont.woff': backendDebugUrl, '/webui/sw.js': backendDebugUrl, },