mirror of
https://github.com/langgenius/dify.git
synced 2026-08-28 21:23:22 +08:00
chore: warning messages too long in model config caused ui issue (#27542)
This commit is contained in:
parent
e60a7c7143
commit
3395297c3e
@ -93,7 +93,7 @@ const ModelProviderPage = ({ searchText }: Props) => {
|
|||||||
{defaultModelNotConfigured && (
|
{defaultModelNotConfigured && (
|
||||||
<div className='system-xs-medium flex items-center gap-1 text-text-primary'>
|
<div className='system-xs-medium flex items-center gap-1 text-text-primary'>
|
||||||
<RiAlertFill className='h-4 w-4 text-text-warning-secondary' />
|
<RiAlertFill className='h-4 w-4 text-text-warning-secondary' />
|
||||||
{t('common.modelProvider.notConfigured')}
|
<span className='max-w-[460px] truncate' title={t('common.modelProvider.notConfigured')}>{t('common.modelProvider.notConfigured')}</span>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<SystemModelSelector
|
<SystemModelSelector
|
||||||
|
|||||||
@ -37,15 +37,18 @@ const ConfigProvider = ({
|
|||||||
const notAllowCustomCredential = provider.allow_custom_token === false
|
const notAllowCustomCredential = provider.allow_custom_token === false
|
||||||
|
|
||||||
const renderTrigger = useCallback(() => {
|
const renderTrigger = useCallback(() => {
|
||||||
|
const text = hasCredential ? t('common.operation.config') : t('common.operation.setup')
|
||||||
const Item = (
|
const Item = (
|
||||||
<Button
|
<Button
|
||||||
className='grow'
|
className='flex grow'
|
||||||
size='small'
|
size='small'
|
||||||
variant={!authorized ? 'secondary-accent' : 'secondary'}
|
variant={!authorized ? 'secondary-accent' : 'secondary'}
|
||||||
|
title={text}
|
||||||
>
|
>
|
||||||
<RiEqualizer2Line className='mr-1 h-3.5 w-3.5' />
|
<RiEqualizer2Line className='mr-1 h-3.5 w-3.5 shrink-0' />
|
||||||
{hasCredential && t('common.operation.config')}
|
<span className='w-0 grow truncate text-left'>
|
||||||
{!hasCredential && t('common.operation.setup')}
|
{text}
|
||||||
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
if (notAllowCustomCredential && !hasCredential) {
|
if (notAllowCustomCredential && !hasCredential) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user