mirror of
https://github.com/langgenius/dify.git
synced 2026-01-07 23:04:12 +00:00
fix: update model icon
This commit is contained in:
@@ -28,11 +28,11 @@ const ModelIcon: FC<ModelIconProps> = ({
|
||||
|
||||
if (provider?.icon_small) {
|
||||
return (
|
||||
<div className={`flex items-center justify-center ${isDeprecated ? 'opacity-50' : ''}`}>
|
||||
<div className={`flex items-center justify-center w-5 h-5 ${isDeprecated ? 'opacity-50' : ''}`}>
|
||||
<img
|
||||
alt='model-icon'
|
||||
src={`${provider.icon_small[language] || provider.icon_small.en_US}`}
|
||||
className={cn('w-5 h-5', className)}
|
||||
className={cn('w-4.5 h-4.5', className)}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -107,7 +107,7 @@ const AgentModelTrigger: FC<AgentModelTriggerProps> = ({
|
||||
{modelId ? (
|
||||
<>
|
||||
<ModelIcon
|
||||
className="m-0.5"
|
||||
className='p-0.5'
|
||||
provider={currentProvider || modelProvider}
|
||||
modelName={currentModel?.model || modelId}
|
||||
isDeprecated={hasDeprecated}
|
||||
|
||||
@@ -34,20 +34,18 @@ const ModelTrigger: FC<ModelTriggerProps> = ({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'group flex items-center p-1 gap-0.5 rounded-lg bg-components-input-bg-normal',
|
||||
'group flex items-center p-1 h-6 gap-0.5 rounded-lg bg-components-input-bg-normal',
|
||||
!readonly && 'hover:bg-components-input-bg-hover cursor-pointer',
|
||||
open && 'bg-components-input-bg-hover',
|
||||
model.status !== ModelStatusEnum.active && 'bg-components-input-bg-disabled hover:bg-components-input-bg-disabled',
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<div className='flex items-center justify-center w-6 h-6'>
|
||||
<ModelIcon
|
||||
className='w-5 h-5 m-0.5'
|
||||
provider={provider}
|
||||
modelName={model.model}
|
||||
/>
|
||||
</div>
|
||||
<ModelIcon
|
||||
className='p-0.5'
|
||||
provider={provider}
|
||||
modelName={model.model}
|
||||
/>
|
||||
<div className='flex px-1 py-[3px] items-center gap-1 grow truncate'>
|
||||
<ModelName
|
||||
className='grow'
|
||||
|
||||
Reference in New Issue
Block a user