From a3b3a06f5e7ba5f76437783e96d9b94d013506d5 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 19 Jun 2026 17:37:43 +0800 Subject: [PATCH] feat(providers): tighten Add Provider header spacing and add footer hint - Reduce title->tabs and tabs->card vertical gaps from 24px to 12px - Add an always-visible footer hint guiding users to fill the fields below after choosing a preset (pinned footer, never scrolls off) - FullScreenPanel: add optional contentClassName prop to scope content padding overrides without affecting the other panels that share it - i18n: add provider.addFooterHint in zh/en/ja/zh-TW --- src/components/common/FullScreenPanel.tsx | 11 ++++++++++- src/components/providers/AddProviderDialog.tsx | 4 ++++ src/i18n/locales/en.json | 1 + src/i18n/locales/ja.json | 1 + src/i18n/locales/zh-TW.json | 1 + src/i18n/locales/zh.json | 1 + 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/components/common/FullScreenPanel.tsx b/src/components/common/FullScreenPanel.tsx index 8c83ecd66..88101d8a3 100644 --- a/src/components/common/FullScreenPanel.tsx +++ b/src/components/common/FullScreenPanel.tsx @@ -10,6 +10,7 @@ import { DRAG_REGION_STYLE, } from "@/lib/platform"; import { isTextEditableTarget } from "@/utils/domUtils"; +import { cn } from "@/lib/utils"; interface FullScreenPanelProps { isOpen: boolean; @@ -17,6 +18,11 @@ interface FullScreenPanelProps { onClose: () => void; children: React.ReactNode; footer?: React.ReactNode; + /** + * 覆盖内容区滚动容器的内边距/间距类。默认 `px-6 py-6 space-y-6`。 + * 通过 `cn`(twMerge) 合并,传入如 `pt-3` 只覆盖顶部内边距,其余保持默认。 + */ + contentClassName?: string; } const DRAG_BAR_HEIGHT = isWindows() || isLinux() ? 0 : 28; // px - match App.tsx @@ -33,6 +39,7 @@ export const FullScreenPanel: React.FC = ({ onClose, children, footer, + contentClassName, }) => { React.useEffect(() => { if (isOpen) { @@ -136,7 +143,9 @@ export const FullScreenPanel: React.FC = ({ {/* Content */}
-
{children}
+
+ {children} +
{/* Footer */} diff --git a/src/components/providers/AddProviderDialog.tsx b/src/components/providers/AddProviderDialog.tsx index 04f41a16f..b1eef9bd8 100644 --- a/src/components/providers/AddProviderDialog.tsx +++ b/src/components/providers/AddProviderDialog.tsx @@ -280,6 +280,9 @@ export function AddProviderDialog({ const footer = !showUniversalTab || activeTab === "app-specific" ? ( <> + + {t("provider.addFooterHint")} +