mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-01 08:08:49 +01:00
feat: icons for chat identification (#879)
* Added endpoint picture * plugin icon fix & new minimalist icon * changed from BingAIMinimalIcon to BingAIMinimalistIcon * fix(Conversation) reduced the space between the icon and the title * refactor(getIcon & getMinimalIcon) * moved IconProps in ~/common * refactor(getIcon & getMinimalistIcon) from switch/case to map * fix(getIcon.tsx) renamed to Icon * renamed all from Minimalist to Minimal
This commit is contained in:
parent
6358383001
commit
2419af8748
18 changed files with 356 additions and 126 deletions
|
|
@ -2,7 +2,7 @@ import { useState } from 'react';
|
|||
import { useRecoilValue } from 'recoil';
|
||||
import { Settings } from 'lucide-react';
|
||||
import { DropdownMenuRadioItem } from '~/components';
|
||||
import { getIcon } from '~/components/Endpoints';
|
||||
import { Icon } from '~/components/Endpoints';
|
||||
import { SetKeyDialog } from '../SetKeyDialog';
|
||||
import { useLocalize } from '~/hooks';
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ export default function ModelItem({
|
|||
const [isDialogOpen, setDialogOpen] = useState(false);
|
||||
const endpointsConfig = useRecoilValue(store.endpointsConfig);
|
||||
|
||||
const icon = getIcon({
|
||||
const icon = Icon({
|
||||
size: 20,
|
||||
endpoint,
|
||||
error: false,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Trash2 } from 'lucide-react';
|
|||
import { useState, useEffect } from 'react';
|
||||
import { useRecoilValue, useRecoilState } from 'recoil';
|
||||
import { useDeletePresetMutation, useCreatePresetMutation } from 'librechat-data-provider';
|
||||
import { getIcon, EditPresetDialog } from '~/components/Endpoints';
|
||||
import { Icon, EditPresetDialog } from '~/components/Endpoints';
|
||||
import EndpointItems from './EndpointItems';
|
||||
import PresetItems from './PresetItems';
|
||||
import FileUpload from './FileUpload';
|
||||
|
|
@ -136,10 +136,9 @@ export default function NewConversationMenu() {
|
|||
deletePresetsMutation.mutate({ arg: preset });
|
||||
};
|
||||
|
||||
const icon = getIcon({
|
||||
const icon = Icon({
|
||||
size: 32,
|
||||
...conversation,
|
||||
isCreatedByUser: false,
|
||||
error: false,
|
||||
button: true,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import type { TPresetItemProps } from '~/common';
|
||||
import type { TPreset } from 'librechat-data-provider';
|
||||
import { DropdownMenuRadioItem, EditIcon, TrashIcon } from '~/components';
|
||||
import { getIcon } from '~/components/Endpoints';
|
||||
import { Icon } from '~/components/Endpoints';
|
||||
|
||||
export default function PresetItem({
|
||||
preset = {} as TPreset,
|
||||
|
|
@ -11,7 +11,7 @@ export default function PresetItem({
|
|||
}: TPresetItemProps) {
|
||||
const { endpoint } = preset;
|
||||
|
||||
const icon = getIcon({
|
||||
const icon = Icon({
|
||||
size: 20,
|
||||
endpoint: preset?.endpoint,
|
||||
model: preset?.model,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue