mirror of
https://github.com/langgenius/dify.git
synced 2026-06-07 07:52:50 +08:00
chore: start input placeholder and bg
This commit is contained in:
parent
00d9c48461
commit
f291aec2cd
@ -25,13 +25,12 @@ export type IConfigModalProps = {
|
|||||||
onConfirm: (newValue: InputVar, moreInfo?: MoreInfo) => void
|
onConfirm: (newValue: InputVar, moreInfo?: MoreInfo) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
const inputClassName = 'w-full px-3 text-sm leading-9 text-gray-900 border-0 rounded-lg grow h-9 bg-gray-50 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
|
const inputClassName = 'w-full px-3 text-sm leading-9 text-gray-900 border-0 rounded-lg grow h-9 bg-gray-100 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
|
||||||
|
|
||||||
const ConfigModal: FC<IConfigModalProps> = ({
|
const ConfigModal: FC<IConfigModalProps> = ({
|
||||||
isCreate,
|
isCreate,
|
||||||
payload,
|
payload,
|
||||||
isShow,
|
isShow,
|
||||||
varKeys = [],
|
|
||||||
onClose,
|
onClose,
|
||||||
onConfirm,
|
onConfirm,
|
||||||
}) => {
|
}) => {
|
||||||
@ -151,14 +150,16 @@ const ConfigModal: FC<IConfigModalProps> = ({
|
|||||||
value={variable}
|
value={variable}
|
||||||
onChange={e => handlePayloadChange('variable')(e.target.value)}
|
onChange={e => handlePayloadChange('variable')(e.target.value)}
|
||||||
onBlur={handleVarKeyBlur}
|
onBlur={handleVarKeyBlur}
|
||||||
|
placeholder={t('appDebug.variableConig.inputPlaceholder')!}
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
<Field title={t('appDebug.variableConig.labelName')}>
|
<Field title={t('appDebug.variableConig.labelName')}>
|
||||||
<input
|
<input
|
||||||
type='text'
|
type='text'
|
||||||
className={inputClassName}
|
className={inputClassName}
|
||||||
value={label}
|
value={label as string}
|
||||||
onChange={e => handlePayloadChange('label')(e.target.value)}
|
onChange={e => handlePayloadChange('label')(e.target.value)}
|
||||||
|
placeholder={t('appDebug.variableConig.inputPlaceholder')!}
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ const ConfigString: FC<IConfigStringProps> = ({
|
|||||||
|
|
||||||
onChange(value)
|
onChange(value)
|
||||||
}}
|
}}
|
||||||
className="w-full px-3 text-sm leading-9 text-gray-900 border-0 rounded-lg grow h-9 bg-gray-50 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200"
|
className="w-full px-3 text-sm leading-9 text-gray-900 border-0 rounded-lg grow h-9 bg-gray-100 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -46,7 +46,7 @@ const VarItem: FC<Props> = ({
|
|||||||
<Variable02 className='w-3.5 h-3.5 text-primary-500' />
|
<Variable02 className='w-3.5 h-3.5 text-primary-500' />
|
||||||
<div title={payload.variable} className='shrink-0 max-w-[130px] truncate text-[13px] font-medium text-gray-700'>{payload.variable}</div>
|
<div title={payload.variable} className='shrink-0 max-w-[130px] truncate text-[13px] font-medium text-gray-700'>{payload.variable}</div>
|
||||||
{payload.label && (<><div className='shrink-0 text-xs font-medium text-gray-400'>·</div>
|
{payload.label && (<><div className='shrink-0 text-xs font-medium text-gray-400'>·</div>
|
||||||
<div title={payload.label} className='max-w-[130px] truncate text-[13px] font-medium text-gray-500'>{payload.label}</div>
|
<div title={payload.label as string} className='max-w-[130px] truncate text-[13px] font-medium text-gray-500'>{payload.label as string}</div>
|
||||||
</>)}
|
</>)}
|
||||||
</div>
|
</div>
|
||||||
<div className='shrink-0 ml-2 flex items-center'>
|
<div className='shrink-0 ml-2 flex items-center'>
|
||||||
|
|||||||
@ -283,6 +283,7 @@ const translation = {
|
|||||||
'apiBasedVar': 'API-based Variable',
|
'apiBasedVar': 'API-based Variable',
|
||||||
'varName': 'Variable Name',
|
'varName': 'Variable Name',
|
||||||
'labelName': 'Label Name',
|
'labelName': 'Label Name',
|
||||||
|
'inputPlaceholder': 'Please input',
|
||||||
'required': 'Required',
|
'required': 'Required',
|
||||||
'errorMsg': {
|
'errorMsg': {
|
||||||
varNameRequired: 'Variable name is required',
|
varNameRequired: 'Variable name is required',
|
||||||
|
|||||||
@ -278,6 +278,7 @@ const translation = {
|
|||||||
'addOption': '添加选项',
|
'addOption': '添加选项',
|
||||||
'apiBasedVar': '基于 API 的变量',
|
'apiBasedVar': '基于 API 的变量',
|
||||||
'varName': '变量名称',
|
'varName': '变量名称',
|
||||||
|
'inputPlaceholder': '请输入',
|
||||||
'labelName': '显示名称',
|
'labelName': '显示名称',
|
||||||
'required': '必填',
|
'required': '必填',
|
||||||
'errorMsg': {
|
'errorMsg': {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user