mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
* fix: show ModelSelector and other buttons properly * chore: remove string templates and fix import order * chore: import order --------- Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
2989ebd649
commit
98b188f26c
1 changed files with 9 additions and 7 deletions
|
|
@ -1,17 +1,18 @@
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { useMediaQuery } from '@librechat/client';
|
import { useMediaQuery } from '@librechat/client';
|
||||||
import { useOutletContext } from 'react-router-dom';
|
import { useOutletContext } from 'react-router-dom';
|
||||||
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
import { getConfigDefaults, PermissionTypes, Permissions } from 'librechat-data-provider';
|
import { getConfigDefaults, PermissionTypes, Permissions } from 'librechat-data-provider';
|
||||||
import type { ContextType } from '~/common';
|
import type { ContextType } from '~/common';
|
||||||
import ModelSelector from './Menus/Endpoints/ModelSelector';
|
|
||||||
import { PresetsMenu, HeaderNewChat, OpenSidebar } from './Menus';
|
import { PresetsMenu, HeaderNewChat, OpenSidebar } from './Menus';
|
||||||
|
import ModelSelector from './Menus/Endpoints/ModelSelector';
|
||||||
import { useGetStartupConfig } from '~/data-provider';
|
import { useGetStartupConfig } from '~/data-provider';
|
||||||
import ExportAndShareMenu from './ExportAndShareMenu';
|
import ExportAndShareMenu from './ExportAndShareMenu';
|
||||||
import BookmarkMenu from './Menus/BookmarkMenu';
|
import BookmarkMenu from './Menus/BookmarkMenu';
|
||||||
import { TemporaryChat } from './TemporaryChat';
|
import { TemporaryChat } from './TemporaryChat';
|
||||||
import AddMultiConvo from './AddMultiConvo';
|
import AddMultiConvo from './AddMultiConvo';
|
||||||
import { useHasAccess } from '~/hooks';
|
import { useHasAccess } from '~/hooks';
|
||||||
import { AnimatePresence, motion } from 'framer-motion';
|
import { cn } from '~/utils';
|
||||||
|
|
||||||
const defaultInterface = getConfigDefaults().interface;
|
const defaultInterface = getConfigDefaults().interface;
|
||||||
|
|
||||||
|
|
@ -44,7 +45,7 @@ export default function Header() {
|
||||||
<AnimatePresence initial={false}>
|
<AnimatePresence initial={false}>
|
||||||
{!navVisible && (
|
{!navVisible && (
|
||||||
<motion.div
|
<motion.div
|
||||||
className={`flex items-center gap-2`}
|
className="flex items-center gap-2"
|
||||||
initial={{ width: 0, opacity: 0 }}
|
initial={{ width: 0, opacity: 0 }}
|
||||||
animate={{ width: 'auto', opacity: 1 }}
|
animate={{ width: 'auto', opacity: 1 }}
|
||||||
exit={{ width: 0, opacity: 0 }}
|
exit={{ width: 0, opacity: 0 }}
|
||||||
|
|
@ -61,11 +62,12 @@ export default function Header() {
|
||||||
</motion.div>
|
</motion.div>
|
||||||
)}
|
)}
|
||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
{!isSmallScreen && !navVisible && (
|
{!(navVisible && isSmallScreen) && (
|
||||||
<div
|
<div
|
||||||
className={`flex items-center gap-2 ${
|
className={cn(
|
||||||
!isSmallScreen ? 'transition-all duration-200 ease-in-out' : ''
|
'flex items-center gap-2',
|
||||||
} `}
|
!isSmallScreen ? 'transition-all duration-200 ease-in-out' : '',
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<ModelSelector startupConfig={startupConfig} />
|
<ModelSelector startupConfig={startupConfig} />
|
||||||
{interfaceConfig.presets === true && interfaceConfig.modelSelect && <PresetsMenu />}
|
{interfaceConfig.presets === true && interfaceConfig.modelSelect && <PresetsMenu />}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue