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.
This commit is contained in:
手瓜一十雪 2026-02-03 18:58:40 +08:00
parent 24c832be16
commit 67dc41bbd2
2 changed files with 4 additions and 3 deletions

View File

@ -132,8 +132,8 @@ export default function ExtensionPage () {
<div className='flex items-center gap-2'>
{tab.icon && <span>{tab.icon}</span>}
<span
className='cursor-pointer hover:underline'
title='点击在新窗口打开'
className='cursor-pointer hover:underline truncate max-w-[6rem] md:max-w-none'
title={`插件:${tab.pluginName}\n点击在新窗口打开`}
onClick={(e) => {
e.stopPropagation();
openInNewWindow(tab.pluginId, tab.path);
@ -141,7 +141,7 @@ export default function ExtensionPage () {
>
{tab.title}
</span>
<span className='text-xs text-default-400'>({tab.pluginName})</span>
<span className='text-xs text-default-400 hidden md:inline'>({tab.pluginName})</span>
</div>
}
/>

View File

@ -30,6 +30,7 @@ export default defineConfig(({ mode }) => {
},
'/api': backendDebugUrl,
'/files': backendDebugUrl,
'/plugin': backendDebugUrl,
'/webui/fonts/CustomFont.woff': backendDebugUrl,
'/webui/sw.js': backendDebugUrl,
},