Skip to content

Commit 3395297

Browse files
authored
chore: warning messages too long in model config caused ui issue (#27542)
1 parent e60a7c7 commit 3395297

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

web/app/components/header/account-setting/model-provider-page/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const ModelProviderPage = ({ searchText }: Props) => {
9393
{defaultModelNotConfigured && (
9494
<div className='system-xs-medium flex items-center gap-1 text-text-primary'>
9595
<RiAlertFill className='h-4 w-4 text-text-warning-secondary' />
96-
{t('common.modelProvider.notConfigured')}
96+
<span className='max-w-[460px] truncate' title={t('common.modelProvider.notConfigured')}>{t('common.modelProvider.notConfigured')}</span>
9797
</div>
9898
)}
9999
<SystemModelSelector

web/app/components/header/account-setting/model-provider-page/model-auth/config-provider.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,18 @@ const ConfigProvider = ({
3737
const notAllowCustomCredential = provider.allow_custom_token === false
3838

3939
const renderTrigger = useCallback(() => {
40+
const text = hasCredential ? t('common.operation.config') : t('common.operation.setup')
4041
const Item = (
4142
<Button
42-
className='grow'
43+
className='flex grow'
4344
size='small'
4445
variant={!authorized ? 'secondary-accent' : 'secondary'}
46+
title={text}
4547
>
46-
<RiEqualizer2Line className='mr-1 h-3.5 w-3.5' />
47-
{hasCredential && t('common.operation.config')}
48-
{!hasCredential && t('common.operation.setup')}
48+
<RiEqualizer2Line className='mr-1 h-3.5 w-3.5 shrink-0' />
49+
<span className='w-0 grow truncate text-left'>
50+
{text}
51+
</span>
4952
</Button>
5053
)
5154
if (notAllowCustomCredential && !hasCredential) {

0 commit comments

Comments
 (0)