mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20:15 +01:00
🪟 fix+feat: General UI Enhancements (#2619)
* feat: Minor design changes to mimic OpenAI's latest login page * fix: Optimize ThemeSelector for mobile * fix: Use a svg for the logo for transperency in dark mode * feat: Update styles for Registration * feat: Update error colors for login & registration * fix: remove medium font * wip: Dropdown menu * feat: Update dropdown to match ChatGPT * feat: Improve rounding and padding * feat: Add UI Updates to RequestPasswordReset, PasswordRest and increase width for theme dropdown * fix: Modify the My Files modal's width to not touch the screen * feat: fix scrolling for dropdown, and make border width lighter * feat: Match popup menu design to OpenAI (p1/2) * fix+feat: fix dark mode, add user email, add lighter borders * fix: Add border color on focus of chat input. * feat: Move Export Conversation to a seperate button (testing) * fix: Properly center Login, Registration, Reset Password Flow * fix: Border colors on dark mode for settings modal * feat: Improve wording for settings menu * fix: Optimize settings modal for mobile and fix height for modal * feat: Optimize for desktop * fix: make TooltipTrigger asChild of button, improve settings mobile responsiveness * feat: Handle dropdowns properly TODO: Make height dynamic, fix dark mode colors * fix: input styles fix: make endpoint icon smaller * feat: Update UI to Match ChatGPT Style - Updated the dropdown styles to match the aesthetic of ChatGPT. - Decreased spacing within the conversation area for cleanliness. - Replaced the current archive icon with the ChatGPT's icon. * fix: fix colors for EditMenuButton & ArchiveButton for dark mode and light mode * fix: ui fixes * fix: Fix Conversation UI Bugs * fix: transparency of HoverToggle to make buttons not visible * fix: dark mode HoverToggle & compress menu item spacing * fix: responsiveness of export icon * fix: first mentionitem is set to always be highlighted * fix: improve hover state to text instead of bg * feat: Update icons to ChatGPT Style * fix: dark mode hover for PanelFileCell * fix: change navlinks z-index to 100 * fix: hover states for DataTable * feat: Move ExportButton to seperate component * chore: remove unused imports
This commit is contained in:
parent
d73ea8e1f2
commit
8f20fb28e5
43 changed files with 716 additions and 469 deletions
|
|
@ -7,13 +7,17 @@ type OptionType = {
|
|||
display?: string;
|
||||
};
|
||||
|
||||
type DropdownPosition = 'left' | 'right';
|
||||
|
||||
interface DropdownProps {
|
||||
value: string;
|
||||
label?: string;
|
||||
onChange: (value: string) => void;
|
||||
options: (string | OptionType)[];
|
||||
className?: string;
|
||||
position?: DropdownPosition;
|
||||
width?: number;
|
||||
maxHeight?: string;
|
||||
testId?: string;
|
||||
}
|
||||
|
||||
|
|
@ -23,11 +27,18 @@ const Dropdown: FC<DropdownProps> = ({
|
|||
onChange,
|
||||
options,
|
||||
className = '',
|
||||
position = 'right',
|
||||
width,
|
||||
maxHeight = 'auto',
|
||||
testId = 'dropdown-menu',
|
||||
}) => {
|
||||
const [selectedValue, setSelectedValue] = useState(initialValue);
|
||||
|
||||
const positionClasses = {
|
||||
right: 'origin-bottom-left left-0',
|
||||
left: 'origin-bottom-right right-0',
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={cn('relative', className)}>
|
||||
<Listbox
|
||||
|
|
@ -41,7 +52,7 @@ const Dropdown: FC<DropdownProps> = ({
|
|||
<Listbox.Button
|
||||
data-testid={testId}
|
||||
className={cn(
|
||||
'relative inline-flex items-center justify-between rounded-md border-gray-300 bg-white py-2 pl-3 pr-8 text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 ',
|
||||
'relative inline-flex items-center justify-between rounded-md border-gray-300 bg-white py-2 pl-3 pr-8 text-gray-700 hover:bg-gray-50 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600',
|
||||
'w-auto',
|
||||
className,
|
||||
)}
|
||||
|
|
@ -67,19 +78,19 @@ const Dropdown: FC<DropdownProps> = ({
|
|||
</Listbox.Button>
|
||||
<Listbox.Options
|
||||
className={cn(
|
||||
'absolute z-50 mt-1 max-h-[40vh] overflow-auto rounded-md border-gray-300 bg-white text-gray-700 shadow-lg transition-opacity hover:bg-gray-50 focus:outline-none dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600',
|
||||
`absolute z-50 mt-1 flex max-h-[40vh] flex-col items-start gap-1 overflow-auto rounded-lg border border-gray-300 bg-white p-1.5 text-gray-700 shadow-lg transition-opacity focus:outline-none dark:border-gray-600 dark:bg-gray-700 dark:text-white ${positionClasses[position]}`,
|
||||
className,
|
||||
)}
|
||||
style={{ width: width ? `${width}px` : 'auto' }}
|
||||
style={{ width: width ? `${width}px` : 'auto', maxHeight: maxHeight }}
|
||||
>
|
||||
{options.map((item, index) => (
|
||||
<Listbox.Option
|
||||
key={index}
|
||||
value={typeof item === 'string' ? item : item.value}
|
||||
className={cn(
|
||||
'relative cursor-pointer select-none border-gray-300 bg-white py-1 pl-3 pr-6 text-gray-700 hover:bg-gray-50 dark:border-gray-300 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600',
|
||||
'relative cursor-pointer select-none rounded border-gray-300 bg-white py-2.5 pl-3 pr-6 text-gray-700 hover:bg-gray-100 dark:border-gray-300 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600',
|
||||
)}
|
||||
style={{ width: width ? `${width}px` : 'auto' }}
|
||||
style={{ width: '100%' }}
|
||||
data-theme={typeof item === 'string' ? item : (item as OptionType).value}
|
||||
>
|
||||
<span className="block truncate">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue