Chore: frontend infrastructure upgrade (#16420)
Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
This commit is contained in:
@@ -53,14 +53,14 @@ const KeyInput = ({
|
||||
<div className={className}>
|
||||
<div className="mb-2 text-[13px] font-medium text-gray-800">{name}</div>
|
||||
<div className='
|
||||
flex items-center px-3 bg-white rounded-lg
|
||||
flex items-center rounded-lg bg-white px-3
|
||||
shadow-xs
|
||||
'>
|
||||
<input
|
||||
className='
|
||||
w-full py-[9px] mr-2
|
||||
text-xs font-medium text-gray-700 leading-[18px]
|
||||
appearance-none outline-none bg-transparent
|
||||
mr-2 w-full appearance-none
|
||||
bg-transparent py-[9px] text-xs font-medium
|
||||
leading-[18px] text-gray-700 outline-none
|
||||
'
|
||||
value={value}
|
||||
placeholder={placeholder}
|
||||
|
||||
@@ -27,15 +27,15 @@ const Operate = ({
|
||||
return (
|
||||
<div className='flex items-center'>
|
||||
<div className='
|
||||
flex items-center
|
||||
mr-[5px] px-3 h-7 rounded-md cursor-pointer
|
||||
mr-[5px] flex
|
||||
h-7 cursor-pointer items-center rounded-md px-3
|
||||
text-xs font-medium text-gray-700
|
||||
' onClick={onCancel} >
|
||||
{t('common.operation.cancel')}
|
||||
</div>
|
||||
<div className='
|
||||
flex items-center
|
||||
px-3 h-7 rounded-md cursor-pointer bg-primary-700
|
||||
flex h-7
|
||||
cursor-pointer items-center rounded-md bg-primary-700 px-3
|
||||
text-xs font-medium text-white
|
||||
' onClick={onSave}>
|
||||
{t('common.operation.save')}
|
||||
@@ -47,8 +47,8 @@ const Operate = ({
|
||||
if (status === 'add') {
|
||||
return (
|
||||
<div className={
|
||||
`px-3 h-[28px] bg-white border border-gray-200 rounded-md cursor-pointer
|
||||
text-xs font-medium text-gray-700 flex items-center ${disabled && 'opacity-50 cursor-default'}}`
|
||||
`flex h-[28px] cursor-pointer items-center rounded-md border border-gray-200
|
||||
bg-white px-3 text-xs font-medium text-gray-700 ${disabled && 'cursor-default opacity-50'}}`
|
||||
} onClick={() => !disabled && onAdd()}>
|
||||
{t('common.provider.addKey')}
|
||||
</div>
|
||||
@@ -60,7 +60,7 @@ const Operate = ({
|
||||
<div className='flex items-center'>
|
||||
{
|
||||
status === 'fail' && (
|
||||
<div className='flex items-center mr-4'>
|
||||
<div className='mr-4 flex items-center'>
|
||||
<div className='text-xs text-[#D92D20]'>{t('common.provider.invalidApiKey')}</div>
|
||||
<Indicator color='red' className='ml-2' />
|
||||
</div>
|
||||
@@ -72,8 +72,8 @@ const Operate = ({
|
||||
)
|
||||
}
|
||||
<div className={
|
||||
`px-3 h-[28px] bg-white border border-gray-200 rounded-md cursor-pointer
|
||||
text-xs font-medium text-gray-700 flex items-center ${disabled && 'opacity-50 cursor-default'}}`
|
||||
`flex h-[28px] cursor-pointer items-center rounded-md border border-gray-200
|
||||
bg-white px-3 text-xs font-medium text-gray-700 ${disabled && 'cursor-default opacity-50'}}`
|
||||
} onClick={() => !disabled && onEdit()}>
|
||||
{t('common.provider.editKey')}
|
||||
</div>
|
||||
|
||||
@@ -5,17 +5,17 @@ import {
|
||||
import { CheckCircle } from '@/app/components/base/icons/src/vender/solid/general'
|
||||
|
||||
export const ValidatedErrorIcon = () => {
|
||||
return <RiErrorWarningFill className='w-4 h-4 text-[#D92D20]' />
|
||||
return <RiErrorWarningFill className='h-4 w-4 text-[#D92D20]' />
|
||||
}
|
||||
|
||||
export const ValidatedSuccessIcon = () => {
|
||||
return <CheckCircle className='w-4 h-4 text-[#039855]' />
|
||||
return <CheckCircle className='h-4 w-4 text-[#039855]' />
|
||||
}
|
||||
|
||||
export const ValidatingTip = () => {
|
||||
const { t } = useTranslation()
|
||||
return (
|
||||
<div className={'mt-2 text-primary-600 text-xs font-normal'}>
|
||||
<div className={'mt-2 text-xs font-normal text-primary-600'}>
|
||||
{t('common.provider.validating')}
|
||||
</div>
|
||||
)
|
||||
@@ -25,7 +25,7 @@ export const ValidatedErrorMessage = ({ errorMessage }: { errorMessage: string }
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<div className={'mt-2 text-[#D92D20] text-xs font-normal'}>
|
||||
<div className={'mt-2 text-xs font-normal text-[#D92D20]'}>
|
||||
{t('common.provider.validatedError')}{errorMessage}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -75,9 +75,9 @@ const KeyValidator = ({
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='mb-2 border-[0.5px] border-gray-200 bg-gray-50 rounded-md'>
|
||||
<div className='mb-2 rounded-md border-[0.5px] border-gray-200 bg-gray-50'>
|
||||
<div className={
|
||||
`flex items-center justify-between px-4 h-[52px] cursor-pointer ${isOpen && 'border-b-[0.5px] border-b-gray-200'}`
|
||||
`flex h-[52px] cursor-pointer items-center justify-between px-4 ${isOpen && 'border-b-[0.5px] border-b-gray-200'}`
|
||||
}>
|
||||
{title}
|
||||
<Operate
|
||||
@@ -108,9 +108,9 @@ const KeyValidator = ({
|
||||
/>
|
||||
))
|
||||
}
|
||||
<a className="flex items-center text-xs cursor-pointer text-primary-600" href={keyFrom.link} target='_blank' rel='noopener noreferrer'>
|
||||
<a className="flex cursor-pointer items-center text-xs text-primary-600" href={keyFrom.link} target='_blank' rel='noopener noreferrer'>
|
||||
{keyFrom.text}
|
||||
<LinkExternal02 className='w-3 h-3 ml-1 text-primary-600' />
|
||||
<LinkExternal02 className='ml-1 h-3 w-3 text-primary-600' />
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user