fix: unify dialog layout and fix content padding issues
- Fix negative margin overflow in all dialog content areas - Standardize dialog structure with flex-col layout - Add consistent py-4 spacing to all content areas - Ensure proper spacing between header, content, and footer Affected components: - AddProviderDialog, EditProviderDialog - McpFormModal, McpPanel - UsageScriptModal - SettingsDialog All dialogs now follow unified layout pattern: - DialogContent: flex flex-col max-h-[90vh] - Content area: flex-1 overflow-y-auto px-6 py-4 - No negative margins that cause content overflow
This commit is contained in:
@@ -63,7 +63,11 @@ export function AddProviderDialog({
|
||||
if (appType === "claude") {
|
||||
const presets = providerPresets;
|
||||
const presetIndex = parseInt(values.presetId.replace("claude-", ""));
|
||||
if (!isNaN(presetIndex) && presetIndex >= 0 && presetIndex < presets.length) {
|
||||
if (
|
||||
!isNaN(presetIndex) &&
|
||||
presetIndex >= 0 &&
|
||||
presetIndex < presets.length
|
||||
) {
|
||||
const preset = presets[presetIndex];
|
||||
if (preset?.endpointCandidates) {
|
||||
preset.endpointCandidates.forEach(addUrl);
|
||||
@@ -72,7 +76,11 @@ export function AddProviderDialog({
|
||||
} else if (appType === "codex") {
|
||||
const presets = codexProviderPresets;
|
||||
const presetIndex = parseInt(values.presetId.replace("codex-", ""));
|
||||
if (!isNaN(presetIndex) && presetIndex >= 0 && presetIndex < presets.length) {
|
||||
if (
|
||||
!isNaN(presetIndex) &&
|
||||
presetIndex >= 0 &&
|
||||
presetIndex < presets.length
|
||||
) {
|
||||
const preset = presets[presetIndex];
|
||||
if ((preset as any).endpointCandidates) {
|
||||
(preset as any).endpointCandidates.forEach(addUrl);
|
||||
@@ -139,7 +147,7 @@ export function AddProviderDialog({
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
|
||||
<div className="flex-1 overflow-y-auto -mx-6 px-6">
|
||||
<div className="flex-1 overflow-y-auto px-6 py-4">
|
||||
<ProviderForm
|
||||
appType={appType}
|
||||
submitLabel={t("common.add", { defaultValue: "添加" })}
|
||||
|
||||
Reference in New Issue
Block a user