mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 08:58:09 +08:00
chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { VarType, type Variable } from '@/app/components/workflow/types'
|
||||
import type { Variable } from '@/app/components/workflow/types'
|
||||
import { VarType } from '@/app/components/workflow/types'
|
||||
|
||||
export const WEBHOOK_RAW_VARIABLE_NAME = '_webhook_raw'
|
||||
export const WEBHOOK_RAW_VARIABLE_LABEL = 'raw'
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { FC } from 'react'
|
||||
import React from 'react'
|
||||
import type { Variable } from '@/app/components/workflow/types'
|
||||
import React from 'react'
|
||||
|
||||
type OutputVariablesContentProps = {
|
||||
variables?: Variable[]
|
||||
@ -27,11 +27,14 @@ type VarItemProps = {
|
||||
|
||||
const VarItem: FC<VarItemProps> = ({ prefix, name, type }) => {
|
||||
return (
|
||||
<div className='py-1'>
|
||||
<div className='flex items-center leading-[18px]'>
|
||||
<span className='code-sm-regular text-text-tertiary'>{prefix}.</span>
|
||||
<span className='code-sm-semibold text-text-secondary'>{name}</span>
|
||||
<span className='system-xs-regular ml-2 text-text-tertiary'>{type}</span>
|
||||
<div className="py-1">
|
||||
<div className="flex items-center leading-[18px]">
|
||||
<span className="code-sm-regular text-text-tertiary">
|
||||
{prefix}
|
||||
.
|
||||
</span>
|
||||
<span className="code-sm-semibold text-text-secondary">{name}</span>
|
||||
<span className="system-xs-regular ml-2 text-text-tertiary">{type}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
@ -52,7 +55,7 @@ export const OutputVariablesContent: FC<OutputVariablesContentProps> = ({ variab
|
||||
const labelA = typeof a.label === 'string' ? a.label : ''
|
||||
const labelB = typeof b.label === 'string' ? b.label : ''
|
||||
return (LABEL_ORDER[labelA as keyof typeof LABEL_ORDER] || 999)
|
||||
- (LABEL_ORDER[labelB as keyof typeof LABEL_ORDER] || 999)
|
||||
- (LABEL_ORDER[labelB as keyof typeof LABEL_ORDER] || 999)
|
||||
})
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user