FEAT: NEW WORKFLOW ENGINE (#3160)

Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: Yeuoly <admin@srmxy.cn>
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
Co-authored-by: jyong <jyong@dify.ai>
Co-authored-by: nite-knite <nkCoding@gmail.com>
Co-authored-by: jyong <718720800@qq.com>
This commit is contained in:
takatost
2024-04-08 18:51:46 +08:00
committed by GitHub
parent 2fb9850af5
commit 7753ba2d37
1161 changed files with 103836 additions and 10327 deletions

View File

@@ -7,6 +7,7 @@ import classNames from 'classnames'
import type { INavSelectorProps } from './nav-selector'
import NavSelector from './nav-selector'
import { ArrowNarrowLeft } from '@/app/components/base/icons/src/vender/line/arrows'
import { useStore as useAppStore } from '@/app/components/app/store'
type INavProps = {
icon: React.ReactNode
@@ -14,6 +15,7 @@ type INavProps = {
text: string
activeSegment: string | string[]
link: string
isApp: boolean
} & INavSelectorProps
const Nav = ({
@@ -27,7 +29,9 @@ const Nav = ({
createText,
onCreate,
onLoadmore,
isApp,
}: INavProps) => {
const { setAppDetail } = useAppStore()
const [hovered, setHovered] = useState(false)
const segment = useSelectedLayoutSegment()
const isActived = Array.isArray(activeSegment) ? activeSegment.includes(segment!) : segment === activeSegment
@@ -40,6 +44,7 @@ const Nav = ({
`}>
<Link href={link}>
<div
onClick={() => setAppDetail()}
className={classNames(`
flex items-center h-7 px-2.5 cursor-pointer rounded-[10px]
${isActived ? 'text-primary-600' : 'text-gray-500'}
@@ -65,6 +70,7 @@ const Nav = ({
<>
<div className='font-light text-gray-300 '>/</div>
<NavSelector
isApp={isApp}
curNav={curNav}
navs={navs}
createText={createText}