| ) | ) | ||||
| : ( | : ( | ||||
| <Tooltip popupContent={t('common.modelProvider.apiKeyStatusNormal')}> | <Tooltip popupContent={t('common.modelProvider.apiKeyStatusNormal')}> | ||||
| <Indicator color='green' /> | |||||
| <Indicator color={credential?.not_allowed_to_use ? 'gray' : 'green'} /> | |||||
| </Tooltip> | </Tooltip> | ||||
| )} | )} | ||||
| </div> | </div> | ||||
| <> | <> | ||||
| <span className='mr-2 h-3 border-r border-r-divider-subtle' /> | <span className='mr-2 h-3 border-r border-r-divider-subtle' /> | ||||
| <Switch | <Switch | ||||
| defaultValue={Boolean(config.enabled)} | |||||
| defaultValue={credential?.not_allowed_to_use ? false : Boolean(config.enabled)} | |||||
| size='md' | size='md' | ||||
| className='justify-self-end' | className='justify-self-end' | ||||
| onChange={value => toggleConfigEntryEnabled(index, value)} | onChange={value => toggleConfigEntryEnabled(index, value)} |