mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-04 06:31:13 +00:00
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:
parent
3e85d18ab5
commit
c3b29f1ee6
@ -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>
|
||||
}
|
||||
/>
|
||||
|
||||
@ -30,6 +30,7 @@ export default defineConfig(({ mode }) => {
|
||||
},
|
||||
'/api': backendDebugUrl,
|
||||
'/files': backendDebugUrl,
|
||||
'/plugin': backendDebugUrl,
|
||||
'/webui/fonts/CustomFont.woff': backendDebugUrl,
|
||||
'/webui/sw.js': backendDebugUrl,
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user