fix(ui): add padding-top to prevent content being covered by fixed header

Add CONTENT_TOP_OFFSET constant (92px = 28px drag bar + 64px header)
and apply it as paddingTop to the root container, ensuring provider
cards and other content are not obscured by the fixed-position header
and env warning banner.
This commit is contained in:
Jason
2025-12-23 22:36:36 +08:00
parent 77cce44490
commit 9ea7952246
+6 -1
View File
@@ -44,6 +44,11 @@ import { Button } from "@/components/ui/button";
type View = "providers" | "settings" | "prompts" | "skills" | "mcp" | "agents";
// 顶部拖拽区域和 header 的高度常量
const DRAG_BAR_HEIGHT = 28; // px
const HEADER_HEIGHT = 64; // px
const CONTENT_TOP_OFFSET = DRAG_BAR_HEIGHT + HEADER_HEIGHT;
function App() {
const { t } = useTranslation();
const queryClient = useQueryClient();
@@ -345,7 +350,7 @@ function App() {
return (
<div
className="flex min-h-screen flex-col bg-background text-foreground selection:bg-primary/30"
style={{ overflowX: "hidden" }}
style={{ overflowX: "hidden", paddingTop: CONTENT_TOP_OFFSET }}
>
{/* 全局拖拽区域(顶部 4px),避免上边框无法拖动 */}
<div