mirror of https://github.com/langgenius/dify.git
chore: add requierd
This commit is contained in:
parent
916bacb60e
commit
113af85c3c
|
|
@ -5,8 +5,8 @@ import { memo } from 'react'
|
|||
import Workflow from '@/app/components/workflow'
|
||||
import { BlockEnum } from '@/app/components/workflow/types'
|
||||
const nodes = [
|
||||
BlockEnum.HttpRequest/* 9 */, BlockEnum.VariableAssigner/* 11 */, BlockEnum.Start/* 1 */, BlockEnum.DirectAnswer/* 2 */, BlockEnum.LLM/* 3 */, BlockEnum.KnowledgeRetrieval/* 4 */, BlockEnum.QuestionClassifier/* 5 */,
|
||||
BlockEnum.IfElse/* 6 */, BlockEnum.Code/* 7 */, BlockEnum.TemplateTransform/* 8 */, BlockEnum.Tool/* 10 */,
|
||||
BlockEnum.HttpRequest/* 9 */, BlockEnum.Tool/* 10 */, BlockEnum.VariableAssigner/* 11 */, BlockEnum.Start/* 1 */, BlockEnum.DirectAnswer/* 2 */, BlockEnum.LLM/* 3 */, BlockEnum.KnowledgeRetrieval/* 4 */, BlockEnum.QuestionClassifier/* 5 */,
|
||||
BlockEnum.IfElse/* 6 */, BlockEnum.Code/* 7 */, BlockEnum.TemplateTransform/* 8 */,
|
||||
BlockEnum.End/* 12 */,
|
||||
].map((item, i) => ({
|
||||
id: `${i + 1}`,
|
||||
|
|
|
|||
|
|
@ -18,10 +18,13 @@ type Props = {
|
|||
onHide: () => void
|
||||
}
|
||||
|
||||
const Field = ({ title, children }: { title: string; children: JSX.Element }) => {
|
||||
const Field = ({ title, isRequired, children }: { title: string; isRequired?: boolean; children: JSX.Element }) => {
|
||||
return (
|
||||
<div>
|
||||
<div className='leading-8 text-[13px] font-medium text-gray-700'>{title}</div>
|
||||
<div className='leading-8 text-[13px] font-medium text-gray-700'>
|
||||
{title}
|
||||
{isRequired && <span className='ml-0.5 text-[#D92D20]'>*</span>}
|
||||
</div>
|
||||
<div>{children}</div>
|
||||
</div>
|
||||
)
|
||||
|
|
@ -115,7 +118,7 @@ const Authorization: FC<Props> = ({
|
|||
/>
|
||||
</Field>
|
||||
{tempPayload.config?.type === APIType.custom && (
|
||||
<Field title={t(`${i18nPrefix}.header`)}>
|
||||
<Field title={t(`${i18nPrefix}.header`)} isRequired>
|
||||
<input
|
||||
type='text'
|
||||
className='w-full h-8 leading-8 px-2.5 rounded-lg border-0 bg-gray-100 text-gray-900 text-[13px] placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
|
||||
|
|
@ -125,7 +128,7 @@ const Authorization: FC<Props> = ({
|
|||
</Field>
|
||||
)}
|
||||
|
||||
<Field title={t(`${i18nPrefix}.api-key-title`)}>
|
||||
<Field title={t(`${i18nPrefix}.api-key-title`)} isRequired>
|
||||
<input
|
||||
type='text'
|
||||
className='w-full h-8 leading-8 px-2.5 rounded-lg border-0 bg-gray-100 text-gray-900 text-[13px] placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import { BlockEnum } from '../../types'
|
||||
import type { ToolNodeType } from './types'
|
||||
import { VarType } from './types'
|
||||
|
||||
export const mockData: ToolNodeType = {
|
||||
title: 'Test',
|
||||
desc: 'Test',
|
||||
type: 'Test',
|
||||
type: BlockEnum.Tool,
|
||||
provider_id: 'test',
|
||||
provider_type: 'builtin',
|
||||
provider_name: 'test',
|
||||
|
|
|
|||
Loading…
Reference in New Issue