mirror of https://github.com/langgenius/dify.git
Fix/enterprise model credential (#25611)
This commit is contained in:
parent
50fec8fc3c
commit
941ad3b4a0
|
|
@ -92,10 +92,10 @@ const CredentialItem = ({
|
|||
)
|
||||
}
|
||||
{
|
||||
showAction && (
|
||||
showAction && !credential.from_enterprise && (
|
||||
<div className='ml-2 hidden shrink-0 items-center group-hover:flex'>
|
||||
{
|
||||
!disableEdit && !credential.not_allowed_to_use && !credential.from_enterprise && (
|
||||
!disableEdit && !credential.not_allowed_to_use && (
|
||||
<Tooltip popupContent={t('common.operation.edit')}>
|
||||
<ActionButton
|
||||
disabled={disabled}
|
||||
|
|
@ -110,7 +110,7 @@ const CredentialItem = ({
|
|||
)
|
||||
}
|
||||
{
|
||||
!disableDelete && !credential.from_enterprise && (
|
||||
!disableDelete && (
|
||||
<Tooltip popupContent={disableDeleteWhenSelected ? disableDeleteTip : t('common.operation.delete')}>
|
||||
<ActionButton
|
||||
className='hover:bg-transparent'
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ const ModelModal: FC<ModelModalProps> = ({
|
|||
const formRef1 = useRef<FormRefObject>(null)
|
||||
const [selectedCredential, setSelectedCredential] = useState<Credential & { addNewCredential?: boolean } | undefined>()
|
||||
const formRef2 = useRef<FormRefObject>(null)
|
||||
const isEditMode = !!Object.keys(formValues).filter((key) => {
|
||||
const isEditMode = !!credential && !!Object.keys(formSchemasValue || {}).filter((key) => {
|
||||
return key !== '__model_name' && key !== '__model_type' && !!formValues[key]
|
||||
}).length && isCurrentWorkspaceManager
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue