mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
style: adjust icon scale, favicon, azure icon; chore: convert files to TSX; ci: unit tests for generation buttons (#987)
* some jsx to tsx and added 3 new test * test(stop) * new librechat and azure icon, small fix * fix(tsc error) * fix(tsc error) Endpoint Item
This commit is contained in:
parent
3137f467a8
commit
be71a1947b
21 changed files with 187 additions and 56 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react';
|
||||
import { Plugin, GPTIcon, AnthropicIcon } from '~/components/svg';
|
||||
import { Plugin, GPTIcon, AnthropicIcon, AzureMinimalIcon } from '~/components/svg';
|
||||
import { useAuthContext } from '~/hooks';
|
||||
import { cn } from '~/utils';
|
||||
import { IconProps } from '~/common';
|
||||
|
|
@ -34,12 +34,12 @@ const Icon: React.FC<IconProps> = (props) => {
|
|||
} else {
|
||||
const endpointIcons = {
|
||||
azureOpenAI: {
|
||||
icon: <GPTIcon size={size * 0.7} />,
|
||||
icon: <AzureMinimalIcon size={size * 0.55} />,
|
||||
bg: 'linear-gradient(0.375turn, #61bde2, #4389d0)',
|
||||
name: 'ChatGPT',
|
||||
},
|
||||
openAI: {
|
||||
icon: <GPTIcon size={size * 0.7} />,
|
||||
icon: <GPTIcon size={size * 0.55} />,
|
||||
bg:
|
||||
typeof model === 'string' && model.toLowerCase().includes('gpt-4')
|
||||
? '#AB68FF'
|
||||
|
|
@ -52,7 +52,7 @@ const Icon: React.FC<IconProps> = (props) => {
|
|||
name: 'Plugins',
|
||||
},
|
||||
google: { icon: <img src="/assets/google-palm.svg" alt="Palm Icon" />, name: 'PaLM2' },
|
||||
anthropic: { icon: <AnthropicIcon size={size * 0.7} />, bg: '#d09a74', name: 'Claude' },
|
||||
anthropic: { icon: <AnthropicIcon size={size * 0.55} />, bg: '#d09a74', name: 'Claude' },
|
||||
bingAI: {
|
||||
icon: jailbreak ? (
|
||||
<img src="/assets/bingai-jb.png" alt="Bing Icon" />
|
||||
|
|
@ -62,7 +62,7 @@ const Icon: React.FC<IconProps> = (props) => {
|
|||
name: jailbreak ? 'Sydney' : 'BingAI',
|
||||
},
|
||||
chatGPTBrowser: {
|
||||
icon: <GPTIcon size={size * 0.7} />,
|
||||
icon: <GPTIcon size={size * 0.55} />,
|
||||
bg:
|
||||
typeof model === 'string' && model.toLowerCase().includes('gpt-4')
|
||||
? '#AB68FF'
|
||||
|
|
@ -73,7 +73,7 @@ const Icon: React.FC<IconProps> = (props) => {
|
|||
default: { icon: <GPTIcon size={size * 0.7} />, bg: 'grey', name: 'UNKNOWN' },
|
||||
};
|
||||
|
||||
const { icon, bg, name } = endpointIcons[endpoint ?? ''] ?? endpointIcons.default;
|
||||
const { icon, bg, name } = endpointIcons[endpoint ?? 'default'];
|
||||
|
||||
return (
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue