mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 03:35:51 +08:00
fix: adjust opacity for model selector based on readonly state (#12472)
This commit is contained in:
parent
6222179a57
commit
6635c393e9
@ -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>
|
<div className={cn('system-md-semibold mb-1', datasetId && 'flex justify-between items-center')}>{t('datasetSettings.form.embeddingModel')}</div>
|
||||||
<ModelSelector
|
<ModelSelector
|
||||||
readonly={!!datasetId}
|
readonly={!!datasetId}
|
||||||
|
triggerClassName={datasetId ? 'opacity-50' : ''}
|
||||||
defaultModel={embeddingModel}
|
defaultModel={embeddingModel}
|
||||||
modelList={embeddingModelList}
|
modelList={embeddingModelList}
|
||||||
onSelect={(model: DefaultModel) => {
|
onSelect={(model: DefaultModel) => {
|
||||||
|
@ -36,7 +36,6 @@ const ModelTrigger: FC<ModelTriggerProps> = ({
|
|||||||
className={classNames(
|
className={classNames(
|
||||||
'group flex items-center px-2 h-8 rounded-lg bg-components-input-bg-normal',
|
'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 && 'hover:bg-components-input-bg-hover cursor-pointer',
|
||||||
!!readonly && 'opacity-50',
|
|
||||||
className,
|
className,
|
||||||
open && '!bg-components-input-bg-hover',
|
open && '!bg-components-input-bg-hover',
|
||||||
model.status !== ModelStatusEnum.active && '!bg-[#FFFAEB]',
|
model.status !== ModelStatusEnum.active && '!bg-[#FFFAEB]',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user