mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 10:25:52 +08:00
make the drop plugin only appears when the user selects "plugins"
This commit is contained in:
parent
58a913b09d
commit
43f87c0b86
@ -29,7 +29,7 @@ const Container = () => {
|
|||||||
}, [t])
|
}, [t])
|
||||||
|
|
||||||
const [activeTab, setActiveTab] = useTabSearchParams({
|
const [activeTab, setActiveTab] = useTabSearchParams({
|
||||||
defaultTab: 'plugins',
|
defaultTab: options[0].value,
|
||||||
})
|
})
|
||||||
|
|
||||||
const containerRef = useRef<HTMLDivElement>(null)
|
const containerRef = useRef<HTMLDivElement>(null)
|
||||||
@ -45,7 +45,7 @@ const Container = () => {
|
|||||||
<div className='flex-1'>
|
<div className='flex-1'>
|
||||||
<TabSlider
|
<TabSlider
|
||||||
value={activeTab}
|
value={activeTab}
|
||||||
onChange={newActiveTab => setActiveTab(newActiveTab)}
|
onChange={setActiveTab}
|
||||||
options={options}
|
options={options}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -108,10 +108,10 @@ const Container = () => {
|
|||||||
<div className='flex px-12 items-start content-start gap-2 flex-grow self-stretch flex-wrap'>
|
<div className='flex px-12 items-start content-start gap-2 flex-grow self-stretch flex-wrap'>
|
||||||
{/* Plugin cards go here */}
|
{/* Plugin cards go here */}
|
||||||
</div>
|
</div>
|
||||||
<div className='flex items-center justify-center py-4 gap-2 text-text-quaternary'>
|
{activeTab === 'plugins' && <div className='flex items-center justify-center py-4 gap-2 text-text-quaternary'>
|
||||||
<RiDragDropLine className='w-4 h-4' />
|
<RiDragDropLine className='w-4 h-4' />
|
||||||
<span className='system-xs-regular'>Drop plugin package here to install</span>
|
<span className='system-xs-regular'>Drop plugin package here to install</span>
|
||||||
</div>
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user