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:
@@ -169,13 +169,13 @@ export function SettingsDialog({
|
||||
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={handleDialogChange}>
|
||||
<DialogContent className="max-w-3xl">
|
||||
<DialogContent className="max-w-3xl max-h-[90vh] flex flex-col">
|
||||
<DialogHeader>
|
||||
<DialogTitle>{t("settings.title")}</DialogTitle>
|
||||
</DialogHeader>
|
||||
|
||||
{isBusy ? (
|
||||
<div className="flex min-h-[320px] items-center justify-center px-6">
|
||||
<div className="flex min-h-[320px] items-center justify-center">
|
||||
<Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
|
||||
</div>
|
||||
) : (
|
||||
@@ -195,7 +195,10 @@ export function SettingsDialog({
|
||||
<TabsTrigger value="about">{t("common.about")}</TabsTrigger>
|
||||
</TabsList>
|
||||
|
||||
<TabsContent value="general" className="space-y-6 mt-6 min-h-[400px]">
|
||||
<TabsContent
|
||||
value="general"
|
||||
className="space-y-6 mt-6 min-h-[400px]"
|
||||
>
|
||||
{settings ? (
|
||||
<>
|
||||
<LanguageSettings
|
||||
@@ -211,7 +214,10 @@ export function SettingsDialog({
|
||||
) : null}
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="advanced" className="space-y-6 mt-6 min-h-[400px]">
|
||||
<TabsContent
|
||||
value="advanced"
|
||||
className="space-y-6 mt-6 min-h-[400px]"
|
||||
>
|
||||
{settings ? (
|
||||
<>
|
||||
<DirectorySettings
|
||||
@@ -268,7 +274,10 @@ export function SettingsDialog({
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
|
||||
<Dialog open={showRestartPrompt} onOpenChange={(open) => !open && handleRestartLater()}>
|
||||
<Dialog
|
||||
open={showRestartPrompt}
|
||||
onOpenChange={(open) => !open && handleRestartLater()}
|
||||
>
|
||||
<DialogContent zIndex="alert" className="max-w-md">
|
||||
<DialogHeader>
|
||||
<DialogTitle>{t("settings.restartRequired")}</DialogTitle>
|
||||
|
||||
Reference in New Issue
Block a user