mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-24 18:23:07 +08:00
fix: button (#5470)
This commit is contained in:
@@ -326,7 +326,8 @@ const ModelModal: FC<ModelModalProps> = ({
|
||||
{
|
||||
isEditMode && (
|
||||
<Button
|
||||
className='mr-2 h-9 text-sm font-medium text-[#D92D20]'
|
||||
size='large'
|
||||
className='mr-2 text-[#D92D20]'
|
||||
onClick={() => setShowConfirm(true)}
|
||||
>
|
||||
{t('common.operation.remove')}
|
||||
@@ -334,13 +335,14 @@ const ModelModal: FC<ModelModalProps> = ({
|
||||
)
|
||||
}
|
||||
<Button
|
||||
className='mr-2 h-9 text-sm font-medium text-gray-700'
|
||||
size='large'
|
||||
className='mr-2'
|
||||
onClick={onCancel}
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
className='h-9 text-sm font-medium'
|
||||
size='large'
|
||||
variant='primary'
|
||||
onClick={handleSave}
|
||||
disabled={
|
||||
|
||||
@@ -276,7 +276,8 @@ const ModelLoadBalancingEntryModal: FC<ModelModalProps> = ({
|
||||
{
|
||||
isEditMode && (
|
||||
<Button
|
||||
className='mr-2 h-9 text-sm font-medium text-[#D92D20]'
|
||||
size='large'
|
||||
className='mr-2 text-[#D92D20]'
|
||||
onClick={() => setShowConfirm(true)}
|
||||
>
|
||||
{t('common.operation.remove')}
|
||||
@@ -284,13 +285,14 @@ const ModelLoadBalancingEntryModal: FC<ModelModalProps> = ({
|
||||
)
|
||||
}
|
||||
<Button
|
||||
className='mr-2 h-9 text-sm font-medium text-gray-700'
|
||||
size='large'
|
||||
className='mr-2'
|
||||
onClick={onCancel}
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
className='h-9 text-sm font-medium'
|
||||
size='large'
|
||||
variant='primary'
|
||||
onClick={handleSave}
|
||||
disabled={loading || filteredRequiredFormSchemas.some(item => value[item.variable] === undefined)}
|
||||
|
||||
@@ -73,7 +73,8 @@ const CredentialPanel: FC<CredentialPanelProps> = ({
|
||||
</div>
|
||||
<div className='flex items-center gap-0.5'>
|
||||
<Button
|
||||
className='grow px-0 h-6 bg-white text-xs font-medium rounded-md'
|
||||
className='grow'
|
||||
size='small'
|
||||
onClick={onSetup}
|
||||
>
|
||||
<Settings01 className='mr-1 w-3 h-3' />
|
||||
|
||||
@@ -75,7 +75,7 @@ const ModelListItem = ({ model, provider, isConfigurable, onConfig, onModifyLoad
|
||||
model.fetch_from === ConfigurationMethodEnum.customizableModel
|
||||
? (
|
||||
<Button
|
||||
className='hidden group-hover:flex py-0 h-7 text-xs font-medium text-gray-700'
|
||||
className='hidden group-hover:flex h-7'
|
||||
onClick={() => onConfig({ __model_name: model.model, __model_type: model.model_type })}
|
||||
>
|
||||
<Settings01 className='mr-[5px] w-3.5 h-3.5' />
|
||||
@@ -85,7 +85,7 @@ const ModelListItem = ({ model, provider, isConfigurable, onConfig, onModifyLoad
|
||||
: ((modelLoadBalancingEnabled || plan.type === Plan.sandbox) && !model.deprecated && [ModelStatusEnum.active, ModelStatusEnum.disabled].includes(model.status))
|
||||
? (
|
||||
<Button
|
||||
className='opacity-0 group-hover:opacity-100 px-3 h-[28px] text-xs text-gray-700 rounded-md transition-opacity'
|
||||
className='opacity-0 group-hover:opacity-100 h-[28px] transition-opacity'
|
||||
onClick={() => onModifyLoadBalancing?.(model)}
|
||||
>
|
||||
<Balance className='mr-1 w-[14px] h-[14px]' />
|
||||
|
||||
@@ -65,7 +65,7 @@ const ProviderCard: FC<ProviderCardProps> = ({
|
||||
return (
|
||||
<Button
|
||||
key={method}
|
||||
className={'h-7 bg-white text-xs text-gray-700 shrink-0'}
|
||||
className={'h-7 text-xs shrink-0'}
|
||||
onClick={() => onOpenModal(method)}
|
||||
>
|
||||
<Settings01 className={`mr-[5px] w-3.5 h-3.5 ${s.icon}`} />
|
||||
@@ -76,7 +76,7 @@ const ProviderCard: FC<ProviderCardProps> = ({
|
||||
return (
|
||||
<Button
|
||||
key={method}
|
||||
className='px-0 h-7 bg-white text-xs text-gray-700'
|
||||
className='px-0 h-7 text-xs'
|
||||
onClick={() => onOpenModal(method)}
|
||||
>
|
||||
<RiAddLine className='mr-[5px] w-3.5 h-3.5' />
|
||||
|
||||
@@ -244,14 +244,12 @@ const SystemModel: FC<SystemModelSelectorProps> = ({
|
||||
</div>
|
||||
<div className='flex items-center justify-end px-6 py-4'>
|
||||
<Button
|
||||
className='mr-2 !h-8 !text-[13px]'
|
||||
onClick={() => setOpen(false)}
|
||||
>
|
||||
{t('common.operation.cancel')}
|
||||
</Button>
|
||||
<Button
|
||||
variant='primary'
|
||||
className='!h-8 !text-[13px]'
|
||||
onClick={handleSave}
|
||||
disabled={!isCurrentWorkspaceManager}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user