mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
feat: detail link in tools
This commit is contained in:
@ -11,15 +11,20 @@ import {
|
||||
PortalToFollowElemTrigger,
|
||||
} from '@/app/components/base/portal-to-follow-elem'
|
||||
import cn from '@/utils/classnames'
|
||||
import { MARKETPLACE_URL_PREFIX } from '@/config'
|
||||
|
||||
type Props = {
|
||||
open: boolean
|
||||
onOpenChange: (v: boolean) => void
|
||||
author: string
|
||||
name: string
|
||||
}
|
||||
|
||||
const OperationDropdown: FC<Props> = ({
|
||||
open,
|
||||
onOpenChange,
|
||||
author,
|
||||
name,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const openRef = useRef(open)
|
||||
@ -50,8 +55,7 @@ const OperationDropdown: FC<Props> = ({
|
||||
<PortalToFollowElemContent className='z-[9999]'>
|
||||
<div className='w-[112px] p-1 bg-components-panel-bg-blur rounded-xl border-[0.5px] border-components-panel-border shadow-lg'>
|
||||
<div className='px-3 py-1.5 rounded-lg text-text-secondary system-md-regular cursor-pointer hover:bg-state-base-hover'>{t('common.operation.download')}</div>
|
||||
{/* Wait marketplace */}
|
||||
{/* <div className='px-3 py-1.5 rounded-lg text-text-secondary system-md-regular cursor-pointer hover:bg-state-base-hover'>{t('common.operation.viewDetail')}</div> */}
|
||||
<a href={`${MARKETPLACE_URL_PREFIX}/plugins/${author}/${name}`} target='_blank' className='block px-3 py-1.5 rounded-lg text-text-secondary system-md-regular cursor-pointer hover:bg-state-base-hover'>{t('common.operation.viewDetails')}</a>
|
||||
</div>
|
||||
</PortalToFollowElemContent>
|
||||
</PortalToFollowElem>
|
||||
|
||||
@ -57,6 +57,8 @@ const Item: FC<Props> = ({
|
||||
<Action
|
||||
open={open}
|
||||
onOpenChange={setOpen}
|
||||
author={payload.org}
|
||||
name={payload.name}
|
||||
/>
|
||||
</div>
|
||||
{isShowInstallModal && (
|
||||
|
||||
Reference in New Issue
Block a user