mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-03 02:51:17 +08:00
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:
+3
-3
@@ -496,14 +496,14 @@ function App() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="flex items-center gap-2"
|
className="flex items-center gap-2 min-h-[40px]"
|
||||||
style={{ WebkitAppRegion: "no-drag" } as any}
|
style={{ WebkitAppRegion: "no-drag" } as any}
|
||||||
>
|
>
|
||||||
{currentView === "prompts" && (
|
{currentView === "prompts" && (
|
||||||
<Button
|
<Button
|
||||||
size="icon"
|
size="icon"
|
||||||
onClick={() => promptPanelRef.current?.openAdd()}
|
onClick={() => promptPanelRef.current?.openAdd()}
|
||||||
className={addActionButtonClass}
|
className={`ml-auto ${addActionButtonClass}`}
|
||||||
title={t("prompts.add")}
|
title={t("prompts.add")}
|
||||||
>
|
>
|
||||||
<Plus className="w-5 h-5" />
|
<Plus className="w-5 h-5" />
|
||||||
@@ -513,7 +513,7 @@ function App() {
|
|||||||
<Button
|
<Button
|
||||||
size="icon"
|
size="icon"
|
||||||
onClick={() => mcpPanelRef.current?.openAdd()}
|
onClick={() => mcpPanelRef.current?.openAdd()}
|
||||||
className={addActionButtonClass}
|
className={`ml-auto ${addActionButtonClass}`}
|
||||||
title={t("mcp.unifiedPanel.addServer")}
|
title={t("mcp.unifiedPanel.addServer")}
|
||||||
>
|
>
|
||||||
<Plus className="w-5 h-5" />
|
<Plus className="w-5 h-5" />
|
||||||
|
|||||||
Reference in New Issue
Block a user