fix: adjust opacity for model selector based on readonly state (#12472)

This commit is contained in:
Wu Tianwei 2025-01-08 12:11:45 +08:00 committed by GitHub
parent 6222179a57
commit 6635c393e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 1 deletions

View File

@ -932,6 +932,7 @@ const StepTwo = ({
<div className={cn('system-md-semibold mb-1', datasetId && 'flex justify-between items-center')}>{t('datasetSettings.form.embeddingModel')}</div>
<ModelSelector
readonly={!!datasetId}
triggerClassName={datasetId ? 'opacity-50' : ''}
defaultModel={embeddingModel}
modelList={embeddingModelList}
onSelect={(model: DefaultModel) => {

View File

@ -36,7 +36,6 @@ const ModelTrigger: FC<ModelTriggerProps> = ({
className={classNames(
'group flex items-center px-2 h-8 rounded-lg bg-components-input-bg-normal',
!readonly && 'hover:bg-components-input-bg-hover cursor-pointer',
!!readonly && 'opacity-50',
className,
open && '!bg-components-input-bg-hover',
model.status !== ModelStatusEnum.active && '!bg-[#FFFAEB]',