mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
add icons and fix ui typos
This commit is contained in:
@ -6,10 +6,13 @@ import {
|
||||
ModelFeatureTextEnum,
|
||||
} from '../declarations'
|
||||
import {
|
||||
AudioSupportIcon,
|
||||
DocumentSupportIcon,
|
||||
// MagicBox,
|
||||
MagicEyes,
|
||||
// MagicWand,
|
||||
// Robot,
|
||||
VideoSupportIcon,
|
||||
} from '@/app/components/base/icons/src/vender/solid/mediaAndDevices'
|
||||
import Tooltip from '@/app/components/base/tooltip'
|
||||
|
||||
@ -73,6 +76,48 @@ const FeatureIcon: FC<FeatureIconProps> = ({
|
||||
)
|
||||
}
|
||||
|
||||
if (feature === ModelFeatureEnum.document) {
|
||||
return (
|
||||
<Tooltip
|
||||
popupContent={t('common.modelProvider.featureSupported', { feature: ModelFeatureTextEnum.document })}
|
||||
>
|
||||
<div className='inline-block cursor-help'>
|
||||
<ModelBadge className={`mr-0.5 !px-0 w-[18px] justify-center text-text-tertiary ${className}`}>
|
||||
<DocumentSupportIcon className='w-3 h-3' />
|
||||
</ModelBadge>
|
||||
</div>
|
||||
</Tooltip>
|
||||
)
|
||||
}
|
||||
|
||||
if (feature === ModelFeatureEnum.audio) {
|
||||
return (
|
||||
<Tooltip
|
||||
popupContent={t('common.modelProvider.featureSupported', { feature: ModelFeatureTextEnum.audio })}
|
||||
>
|
||||
<div className='inline-block cursor-help'>
|
||||
<ModelBadge className={`mr-0.5 !px-0 w-[18px] justify-center text-text-tertiary ${className}`}>
|
||||
<AudioSupportIcon className='w-3 h-3' />
|
||||
</ModelBadge>
|
||||
</div>
|
||||
</Tooltip>
|
||||
)
|
||||
}
|
||||
|
||||
if (feature === ModelFeatureEnum.video) {
|
||||
return (
|
||||
<Tooltip
|
||||
popupContent={t('common.modelProvider.featureSupported', { feature: ModelFeatureTextEnum.video })}
|
||||
>
|
||||
<div className='inline-block cursor-help'>
|
||||
<ModelBadge className={`mr-0.5 !px-0 w-[18px] justify-center text-text-tertiary ${className}`}>
|
||||
<VideoSupportIcon className='w-3 h-3' />
|
||||
</ModelBadge>
|
||||
</div>
|
||||
</Tooltip>
|
||||
)
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
@ -34,18 +34,20 @@ const ModelTrigger: FC<ModelTriggerProps> = ({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'group flex items-center p-1 gap-0.5 h-6 rounded-lg bg-components-input-bg-normal',
|
||||
'group flex items-center p-1 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,
|
||||
)}
|
||||
>
|
||||
<ModelIcon
|
||||
className='w-4 h-4'
|
||||
provider={provider}
|
||||
modelName={model.model}
|
||||
/>
|
||||
<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>
|
||||
<div className='flex px-1 py-[3px] items-center gap-1 grow'>
|
||||
<ModelName
|
||||
className='grow'
|
||||
|
||||
Reference in New Issue
Block a user