mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 11:26:52 +08:00
feat: parent child retrieval (#12106)
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import React, { useEffect } from 'react'
|
||||
import { useShallow } from 'zustand/react/shallow'
|
||||
import { RiLayoutRight2Line } from '@remixicon/react'
|
||||
import { LayoutRight2LineMod } from '../base/icons/src/public/knowledge'
|
||||
import NavLink from './navLink'
|
||||
import type { NavIcon } from './navLink'
|
||||
import AppBasic from './basic'
|
||||
import AppInfo from './app-info'
|
||||
import DatasetInfo from './dataset-info'
|
||||
import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
|
||||
import {
|
||||
AlignLeft01,
|
||||
AlignRight01,
|
||||
} from '@/app/components/base/icons/src/vender/line/layout'
|
||||
import { useStore as useAppStore } from '@/app/components/app/store'
|
||||
import cn from '@/utils/classnames'
|
||||
|
||||
export type IAppDetailNavProps = {
|
||||
iconType?: 'app' | 'dataset' | 'notion'
|
||||
@@ -63,7 +63,16 @@ const AppDetailNav = ({ title, desc, isExternal, icon, icon_background, navigati
|
||||
{iconType === 'app' && (
|
||||
<AppInfo expand={expand} />
|
||||
)}
|
||||
{iconType !== 'app' && (
|
||||
{iconType === 'dataset' && (
|
||||
<DatasetInfo
|
||||
name={title}
|
||||
description={desc}
|
||||
isExternal={isExternal}
|
||||
expand={expand}
|
||||
extraInfo={extraInfo && extraInfo(appSidebarExpand)}
|
||||
/>
|
||||
)}
|
||||
{!['app', 'dataset'].includes(iconType) && (
|
||||
<AppBasic
|
||||
mode={appSidebarExpand}
|
||||
iconType={iconType}
|
||||
@@ -75,9 +84,9 @@ const AppDetailNav = ({ title, desc, isExternal, icon, icon_background, navigati
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
{!expand && (
|
||||
<div className='mt-1 mx-auto w-6 h-[1px] bg-divider-subtle' />
|
||||
)}
|
||||
<div className='px-4'>
|
||||
<div className={cn('mt-1 mx-auto h-[1px] bg-divider-subtle', !expand && 'w-6')} />
|
||||
</div>
|
||||
<nav
|
||||
className={`
|
||||
grow space-y-1
|
||||
@@ -89,7 +98,6 @@ const AppDetailNav = ({ title, desc, isExternal, icon, icon_background, navigati
|
||||
<NavLink key={index} mode={appSidebarExpand} iconMap={{ selected: item.selectedIcon, normal: item.icon }} name={item.name} href={item.href} />
|
||||
)
|
||||
})}
|
||||
{extraInfo && extraInfo(appSidebarExpand)}
|
||||
</nav>
|
||||
{
|
||||
!isMobile && (
|
||||
@@ -105,8 +113,8 @@ const AppDetailNav = ({ title, desc, isExternal, icon, icon_background, navigati
|
||||
>
|
||||
{
|
||||
expand
|
||||
? <AlignLeft01 className='w-[14px] h-[14px]' />
|
||||
: <AlignRight01 className='w-[14px] h-[14px]' />
|
||||
? <RiLayoutRight2Line className='w-5 h-5 text-components-menu-item-text' />
|
||||
: <LayoutRight2LineMod className='w-5 h-5 text-components-menu-item-text' />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user