From 1effbf1313d9ce165d5faecbe29a58e414e19d4e Mon Sep 17 00:00:00 2001
From: Marco Beretta <81851188+berry-13@users.noreply.github.com>
Date: Tue, 6 Jan 2026 12:09:34 +0100
Subject: [PATCH] style: refactor dialog components to use OGDialogFooter for
improved layout consistency
---
.../ConvoOptions/DeleteButton.tsx | 5 +-
.../ConvoOptions/SharedLinkButton.tsx | 21 +--
.../SidePanel/Agents/Code/ApiKeyDialog.tsx | 150 ++++++++++--------
.../client/src/components/OriginalDialog.tsx | 2 +-
4 files changed, 96 insertions(+), 82 deletions(-)
diff --git a/client/src/components/Conversations/ConvoOptions/DeleteButton.tsx b/client/src/components/Conversations/ConvoOptions/DeleteButton.tsx
index 17691b4a08..f68049c962 100644
--- a/client/src/components/Conversations/ConvoOptions/DeleteButton.tsx
+++ b/client/src/components/Conversations/ConvoOptions/DeleteButton.tsx
@@ -10,6 +10,7 @@ import {
OGDialogClose,
OGDialogTitle,
OGDialogHeader,
+ OGDialogFooter,
OGDialogContent,
useToastContext,
} from '@librechat/client';
@@ -96,7 +97,7 @@ export function DeleteConversationDialog({
components={{ strong: }}
/>
-
+
+
);
}
diff --git a/client/src/components/Conversations/ConvoOptions/SharedLinkButton.tsx b/client/src/components/Conversations/ConvoOptions/SharedLinkButton.tsx
index 7c53cab64c..44d896c3cf 100644
--- a/client/src/components/Conversations/ConvoOptions/SharedLinkButton.tsx
+++ b/client/src/components/Conversations/ConvoOptions/SharedLinkButton.tsx
@@ -10,8 +10,9 @@ import {
TooltipAnchor,
OGDialogTitle,
OGDialogHeader,
- useToastContext,
+ OGDialogFooter,
OGDialogContent,
+ useToastContext,
} from '@librechat/client';
import type { TSharedLinkGetResponse } from 'librechat-data-provider';
import {
@@ -132,12 +133,6 @@ export default function SharedLinkButton({
return (
<>
- {!shareId && (
-
- {!isCreateLoading && localize('com_ui_create_link')}
- {isCreateLoading && }
-
- )}
{shareId && (
)}
+ {!shareId && (
+
+
+ {!isCreateLoading && localize('com_ui_create_link')}
+ {isCreateLoading && }
+
+
+ )}
-
+
{localize('com_ui_cancel')}
@@ -229,7 +232,7 @@ export default function SharedLinkButton({
localize('com_ui_delete')
)}
-
+
diff --git a/client/src/components/SidePanel/Agents/Code/ApiKeyDialog.tsx b/client/src/components/SidePanel/Agents/Code/ApiKeyDialog.tsx
index 70f114ae44..282f17b0d3 100644
--- a/client/src/components/SidePanel/Agents/Code/ApiKeyDialog.tsx
+++ b/client/src/components/SidePanel/Agents/Code/ApiKeyDialog.tsx
@@ -1,9 +1,32 @@
-import { OGDialogTemplate, Input, Button, OGDialog } from '@librechat/client';
+import {
+ Button,
+ OGDialog,
+ SecretInput,
+ OGDialogClose,
+ OGDialogTitle,
+ OGDialogFooter,
+ OGDialogHeader,
+ OGDialogContent,
+ OGDialogDescription,
+} from '@librechat/client';
import type { UseFormRegister, UseFormHandleSubmit } from 'react-hook-form';
import type { ApiKeyFormData } from '~/common';
import type { RefObject } from 'react';
import { useLocalize } from '~/hooks';
+const languageIcons = [
+ 'python.svg',
+ 'nodedotjs.svg',
+ 'tsnode.svg',
+ 'rust.svg',
+ 'go.svg',
+ 'c.svg',
+ 'cplusplus.svg',
+ 'php.svg',
+ 'fortran.svg',
+ 'r.svg',
+];
+
export default function ApiKeyDialog({
isOpen,
onSubmit,
@@ -28,18 +51,6 @@ export default function ApiKeyDialog({
triggerRefs?: RefObject[];
}) {
const localize = useLocalize();
- const languageIcons = [
- 'python.svg',
- 'nodedotjs.svg',
- 'tsnode.svg',
- 'rust.svg',
- 'go.svg',
- 'c.svg',
- 'cplusplus.svg',
- 'php.svg',
- 'fortran.svg',
- 'r.svg',
- ];
return (
-
-
- {localize('com_ui_librechat_code_api_title')}
-
-
- {localize('com_ui_librechat_code_api_subtitle')}
-
- {/* Language Icons Stack */}
-
-
- {languageIcons.map((icon) => (
-
-

-
- ))}
+
+
+
+ {localize('com_ui_librechat_code_api_title')}
+
+
-
- >
- }
- selection={{
- selectHandler: handleSubmit(onSubmit),
- selectClasses: 'bg-green-500 hover:bg-green-600 text-white',
- selectText: localize('com_ui_save'),
- }}
- buttons={
- isUserProvided &&
- isToolAuthenticated && (
+ ))}
+
+
+ {localize('com_ui_librechat_code_api_subtitle')}
+
+
+
+
+
+
+
+
+ {localize('com_ui_cancel')}
+
+
+ {isUserProvided && isToolAuthenticated && (
{localize('com_ui_revoke')}
- )
- }
- showCancelButton={true}
- />
+ )}
+
+ {localize('com_ui_save')}
+
+
+
);
}
diff --git a/packages/client/src/components/OriginalDialog.tsx b/packages/client/src/components/OriginalDialog.tsx
index e870cbc8c0..dd5772c126 100644
--- a/packages/client/src/components/OriginalDialog.tsx
+++ b/packages/client/src/components/OriginalDialog.tsx
@@ -168,7 +168,7 @@ DialogHeader.displayName = 'DialogHeader';
const DialogFooter = ({ className, ...props }: React.HTMLAttributes
) => (
);