feat: detail link in tools

pull/12372/head
Joel 2 years ago
parent 000db07d29
commit 2067092f52

@ -142,7 +142,7 @@ const PluginItem: FC<Props> = ({
} }
{source === PluginSource.marketplace {source === PluginSource.marketplace
&& <> && <>
<a href={`${MARKETPLACE_URL_PREFIX}/plugin/${author}/${name}`} target='_blank' className='flex items-center gap-0.5'> <a href={`${MARKETPLACE_URL_PREFIX}/plugins/${author}/${name}`} target='_blank' className='flex items-center gap-0.5'>
<div className='text-text-tertiary system-2xs-medium-uppercase'>{t('plugin.from')} <span className='text-text-secondary'>marketplace</span></div> <div className='text-text-tertiary system-2xs-medium-uppercase'>{t('plugin.from')} <span className='text-text-secondary'>marketplace</span></div>
<RiArrowRightUpLine className='w-3 h-3' /> <RiArrowRightUpLine className='w-3 h-3' />
</a> </a>

@ -11,15 +11,20 @@ import {
PortalToFollowElemTrigger, PortalToFollowElemTrigger,
} from '@/app/components/base/portal-to-follow-elem' } from '@/app/components/base/portal-to-follow-elem'
import cn from '@/utils/classnames' import cn from '@/utils/classnames'
import { MARKETPLACE_URL_PREFIX } from '@/config'
type Props = { type Props = {
open: boolean open: boolean
onOpenChange: (v: boolean) => void onOpenChange: (v: boolean) => void
author: string
name: string
} }
const OperationDropdown: FC<Props> = ({ const OperationDropdown: FC<Props> = ({
open, open,
onOpenChange, onOpenChange,
author,
name,
}) => { }) => {
const { t } = useTranslation() const { t } = useTranslation()
const openRef = useRef(open) const openRef = useRef(open)
@ -50,8 +55,7 @@ const OperationDropdown: FC<Props> = ({
<PortalToFollowElemContent className='z-[9999]'> <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='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> <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 */} <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 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> */}
</div> </div>
</PortalToFollowElemContent> </PortalToFollowElemContent>
</PortalToFollowElem> </PortalToFollowElem>

@ -57,6 +57,8 @@ const Item: FC<Props> = ({
<Action <Action
open={open} open={open}
onOpenChange={setOpen} onOpenChange={setOpen}
author={payload.org}
name={payload.name}
/> />
</div> </div>
{isShowInstallModal && ( {isShowInstallModal && (

@ -27,6 +27,7 @@ const translation = {
lineBreak: 'Line break', lineBreak: 'Line break',
sure: 'I\'m sure', sure: 'I\'m sure',
download: 'Download', download: 'Download',
viewDetails: 'View Details',
delete: 'Delete', delete: 'Delete',
settings: 'Settings', settings: 'Settings',
setup: 'Setup', setup: 'Setup',

@ -27,6 +27,7 @@ const translation = {
lineBreak: '换行', lineBreak: '换行',
sure: '我确定', sure: '我确定',
download: '下载', download: '下载',
viewDetails: '查看详情',
delete: '删除', delete: '删除',
settings: '设置', settings: '设置',
setup: '设置', setup: '设置',

Loading…
Cancel
Save