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,10 +1,9 @@
|
||||
import type {
|
||||
FC,
|
||||
} from 'react'
|
||||
import {
|
||||
memo,
|
||||
useMemo,
|
||||
} from 'react'
|
||||
import type {
|
||||
NodeProps,
|
||||
} from '@/app/components/workflow/types'
|
||||
import {
|
||||
RiAlertFill,
|
||||
RiCheckboxCircleFill,
|
||||
@ -12,20 +11,21 @@ import {
|
||||
RiLoader2Line,
|
||||
} from '@remixicon/react'
|
||||
import {
|
||||
NodeTargetHandle,
|
||||
} from '@/app/components/workflow/nodes/_base/components/node-handle'
|
||||
import NodeControl from '@/app/components/workflow/nodes/_base/components/node-control'
|
||||
import { cn } from '@/utils/classnames'
|
||||
memo,
|
||||
useMemo,
|
||||
} from 'react'
|
||||
import BlockIcon from '@/app/components/workflow/block-icon'
|
||||
import type {
|
||||
NodeProps,
|
||||
} from '@/app/components/workflow/types'
|
||||
import {
|
||||
NodeRunningStatus,
|
||||
} from '@/app/components/workflow/types'
|
||||
import {
|
||||
useNodesReadOnly,
|
||||
} from '@/app/components/workflow/hooks'
|
||||
import NodeControl from '@/app/components/workflow/nodes/_base/components/node-control'
|
||||
import {
|
||||
NodeTargetHandle,
|
||||
} from '@/app/components/workflow/nodes/_base/components/node-handle'
|
||||
import {
|
||||
NodeRunningStatus,
|
||||
} from '@/app/components/workflow/types'
|
||||
import { cn } from '@/utils/classnames'
|
||||
|
||||
type SimpleNodeProps = NodeProps
|
||||
|
||||
@ -80,8 +80,8 @@ const SimpleNode: FC<SimpleNodeProps> = ({
|
||||
<NodeTargetHandle
|
||||
id={id}
|
||||
data={data}
|
||||
handleClassName='!top-4 !-left-[9px] !translate-y-0'
|
||||
handleId='target'
|
||||
handleClassName="!top-4 !-left-[9px] !translate-y-0"
|
||||
handleId="target"
|
||||
/>
|
||||
)
|
||||
}
|
||||
@ -95,15 +95,16 @@ const SimpleNode: FC<SimpleNodeProps> = ({
|
||||
}
|
||||
<div className={cn(
|
||||
'flex items-center rounded-t-2xl px-3 pb-2 pt-3',
|
||||
)}>
|
||||
)}
|
||||
>
|
||||
<BlockIcon
|
||||
className='mr-2 shrink-0'
|
||||
className="mr-2 shrink-0"
|
||||
type={data.type}
|
||||
size='md'
|
||||
size="md"
|
||||
/>
|
||||
<div
|
||||
title={data.title}
|
||||
className='system-sm-semibold-uppercase mr-1 flex grow items-center truncate text-text-primary'
|
||||
className="system-sm-semibold-uppercase mr-1 flex grow items-center truncate text-text-primary"
|
||||
>
|
||||
<div>
|
||||
{data.title}
|
||||
@ -111,22 +112,22 @@ const SimpleNode: FC<SimpleNodeProps> = ({
|
||||
</div>
|
||||
{
|
||||
(data._runningStatus === NodeRunningStatus.Running || data._singleRunningStatus === NodeRunningStatus.Running) && (
|
||||
<RiLoader2Line className='h-3.5 w-3.5 animate-spin text-text-accent' />
|
||||
<RiLoader2Line className="h-3.5 w-3.5 animate-spin text-text-accent" />
|
||||
)
|
||||
}
|
||||
{
|
||||
data._runningStatus === NodeRunningStatus.Succeeded && (
|
||||
<RiCheckboxCircleFill className='h-3.5 w-3.5 text-text-success' />
|
||||
<RiCheckboxCircleFill className="h-3.5 w-3.5 text-text-success" />
|
||||
)
|
||||
}
|
||||
{
|
||||
data._runningStatus === NodeRunningStatus.Failed && (
|
||||
<RiErrorWarningFill className='h-3.5 w-3.5 text-text-destructive' />
|
||||
<RiErrorWarningFill className="h-3.5 w-3.5 text-text-destructive" />
|
||||
)
|
||||
}
|
||||
{
|
||||
data._runningStatus === NodeRunningStatus.Exception && (
|
||||
<RiAlertFill className='h-3.5 w-3.5 text-text-warning-secondary' />
|
||||
<RiAlertFill className="h-3.5 w-3.5 text-text-warning-secondary" />
|
||||
)
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user