mirror of https://github.com/langgenius/dify.git
fix: choose tools
This commit is contained in:
parent
3a09f43f70
commit
3bed0346d7
|
|
@ -40,7 +40,7 @@ const SearchBox = ({
|
|||
locale={locale}
|
||||
/>
|
||||
<div className='mx-1 w-[1px] h-3.5 bg-divider-regular'></div>
|
||||
<div className='grow flex items-center p-1 pl-2'>
|
||||
<div className='relative grow flex items-center p-1 pl-2'>
|
||||
<div className='flex items-center mr-2 w-full'>
|
||||
<input
|
||||
className={cn(
|
||||
|
|
@ -54,9 +54,11 @@ const SearchBox = ({
|
|||
/>
|
||||
{
|
||||
search && (
|
||||
<ActionButton onClick={() => onSearchChange('')}>
|
||||
<RiCloseLine className='w-4 h-4' />
|
||||
</ActionButton>
|
||||
<div className='absolute right-2 top-1/2 -translate-y-1/2'>
|
||||
<ActionButton onClick={() => onSearchChange('')}>
|
||||
<RiCloseLine className='w-4 h-4' />
|
||||
</ActionButton>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -74,11 +74,13 @@ const List = ({
|
|||
)
|
||||
}
|
||||
|
||||
const maxWidthClassName = 'max-w-[300px]'
|
||||
|
||||
return (
|
||||
<>
|
||||
{hasRes && (
|
||||
<div
|
||||
className={cn('sticky z-10 flex justify-between h-8 px-4 py-1 text-text-primary system-sm-medium cursor-pointer', stickyClassName)}
|
||||
className={cn('sticky z-10 flex justify-between h-8 px-4 py-1 text-text-primary system-sm-medium cursor-pointer', stickyClassName, maxWidthClassName)}
|
||||
onClick={handleHeadClick}
|
||||
>
|
||||
<span>{t('plugin.fromMarketplace')}</span>
|
||||
|
|
@ -93,7 +95,7 @@ const List = ({
|
|||
</Link>
|
||||
</div>
|
||||
)}
|
||||
<div className='p-1' ref={nextToStickyELemRef}>
|
||||
<div className={cn('p-1', maxWidthClassName)} ref={nextToStickyELemRef}>
|
||||
{list.map((item, index) => (
|
||||
<Item
|
||||
key={index}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ const Tabs: FC<TabsProps> = ({
|
|||
{
|
||||
activeTab === TabsEnum.Tools && (
|
||||
<AllTools
|
||||
className='w-[315px]'
|
||||
searchText={searchText}
|
||||
onSelect={onSelect}
|
||||
tags={tags}
|
||||
|
|
|
|||
Loading…
Reference in New Issue