fix(ui): prevent header layout shift when switching views

Add min-height to right-side button container and ml-auto to add buttons
in MCP/Prompts views to maintain consistent header height and button
position across all views.
This commit is contained in:
Jason
2025-12-21 16:23:47 +08:00
parent 26c3f05daf
commit bf570b6d2a

View File

@@ -496,14 +496,14 @@ function App() {
</div>
<div
className="flex items-center gap-2"
className="flex items-center gap-2 min-h-[40px]"
style={{ WebkitAppRegion: "no-drag" } as any}
>
{currentView === "prompts" && (
<Button
size="icon"
onClick={() => promptPanelRef.current?.openAdd()}
className={addActionButtonClass}
className={`ml-auto ${addActionButtonClass}`}
title={t("prompts.add")}
>
<Plus className="w-5 h-5" />
@@ -513,7 +513,7 @@ function App() {
<Button
size="icon"
onClick={() => mcpPanelRef.current?.openAdd()}
className={addActionButtonClass}
className={`ml-auto ${addActionButtonClass}`}
title={t("mcp.unifiedPanel.addServer")}
>
<Plus className="w-5 h-5" />