🖼️ style: Conversation Menu and Dialogs update (#3601)

* feat: new dropdown

* fix: maintain popover active when open

* fix: update DeleteButton and ShareButton component to use useState for managing dialog state

* BREAKING: style improvement of base Button component

* style: update export button

* a11y: ExportAndShareButton

* add border

* quick style fix

* fix: flick issue on convo

* fix: DropDown opens when renaming

* chore: update radix-ui/react-dropdown-menu to latest

* small fix

* style: bookmarks update

* reorder export modal

* feat: imporved dropdowns

* style: a lot of changes; header, bookmarks, export, nav, convo, convoOptions

* fix: small style issues

* fix: button

* fix: bookmarks header menu

* fix: dropdown close glitch

* feat: Improve accessibility and keyboard navigation in ModelSpec component

* fix: Nav related type issues

* style: ConvoOptions theming and focus ring

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
Marco Beretta 2024-08-16 10:30:14 +02:00 committed by GitHub
parent 7f50d2f7c0
commit 96581d56df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 2627 additions and 1821 deletions

View file

@ -12,31 +12,31 @@ export default function Footer({ className }: { className?: string }) {
const privacyPolicy = config?.interface?.privacyPolicy;
const termsOfService = config?.interface?.termsOfService;
const privacyPolicyRender = privacyPolicy?.externalUrl && (
const privacyPolicyRender = privacyPolicy?.externalUrl != null && (
<a
className=" text-gray-600 underline dark:text-gray-300"
className="text-text-secondary underline"
href={privacyPolicy.externalUrl}
target={privacyPolicy.openNewTab ? '_blank' : undefined}
target={privacyPolicy.openNewTab === true ? '_blank' : undefined}
rel="noreferrer"
>
{localize('com_ui_privacy_policy')}
</a>
);
const termsOfServiceRender = termsOfService?.externalUrl && (
const termsOfServiceRender = termsOfService?.externalUrl != null && (
<a
className=" text-gray-600 underline dark:text-gray-300"
className="text-text-secondary underline"
href={termsOfService.externalUrl}
target={termsOfService.openNewTab ? '_blank' : undefined}
target={termsOfService.openNewTab === true ? '_blank' : undefined}
rel="noreferrer"
>
{localize('com_ui_terms_of_service')}
</a>
);
if (config?.analyticsGtmId) {
if (config?.analyticsGtmId != null) {
const tagManagerArgs = {
gtmId: config?.analyticsGtmId,
gtmId: config.analyticsGtmId,
};
TagManager.initialize(tagManagerArgs);
}
@ -54,19 +54,22 @@ export default function Footer({ className }: { className?: string }) {
<React.Fragment key={`main-content-part-${index}`}>
<ReactMarkdown
components={{
a: (props) => {
const { ['node']: _, href, ...otherProps } = props;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
a: ({ node: _n, href, children, ...otherProps }) => {
return (
<a
className=" text-gray-600 underline dark:text-gray-300"
className="text-text-secondary underline"
href={href}
target="_blank"
rel="noreferrer"
{...otherProps}
/>
>
{children}
</a>
);
},
p: ({ node, ...props }) => <span {...props} />,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
p: ({ node: _n, ...props }) => <span {...props} />,
}}
>
{text.trim()}
@ -81,8 +84,8 @@ export default function Footer({ className }: { className?: string }) {
return (
<div
className={
className ||
'relative flex items-center justify-center gap-2 px-2 py-2 text-center text-xs text-gray-600 dark:text-gray-300 md:px-[60px]'
className ??
'relative flex items-center justify-center gap-2 px-2 py-2 text-center text-xs text-text-primary md:px-[60px]'
}
role="contentinfo"
>
@ -92,7 +95,7 @@ export default function Footer({ className }: { className?: string }) {
<React.Fragment key={`footer-element-${index}`}>
{contentRender}
{!isLastElement && (
<div key={`separator-${index}`} className="h-2 border-r-[1px] border-gray-300" />
<div key={`separator-${index}`} className="h-2 border-r-[1px] border-border-medium" />
)}
</React.Fragment>
);