mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
click handle of provider card
This commit is contained in:
parent
f257184b00
commit
96c3ec91af
|
@ -1,5 +1,6 @@
|
|||
'use client'
|
||||
import { RiArrowRightUpLine } from '@remixicon/react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Card from '@/app/components/plugins/card'
|
||||
import CardMoreInfo from '@/app/components/plugins/card/card-more-info'
|
||||
import type { Plugin } from '@/app/components/plugins/types'
|
||||
|
@ -14,6 +15,7 @@ const CardWrapper = ({
|
|||
plugin,
|
||||
showInstallButton,
|
||||
}: CardWrapperProps) => {
|
||||
const { t } = useTranslation()
|
||||
return (
|
||||
<div className='group relative rounded-xl cursor-pointer'>
|
||||
<Card
|
||||
|
@ -33,14 +35,15 @@ const CardWrapper = ({
|
|||
variant='primary'
|
||||
className='flex-1'
|
||||
>
|
||||
Install
|
||||
{t('plugin.detailPanel.operation.install')}
|
||||
</Button>
|
||||
<Button
|
||||
className='flex-1'
|
||||
>
|
||||
<a href={`${MARKETPLACE_URL_PREFIX}/plugin/${plugin.org}/${plugin.name}`} target='_blank' className='flex items-center gap-0.5'></a>
|
||||
Details
|
||||
<RiArrowRightUpLine className='ml-1 w-4 h-4' />
|
||||
<a href={`${MARKETPLACE_URL_PREFIX}/plugin/${plugin.org}/${plugin.name}`} target='_blank' className='flex items-center gap-0.5'>
|
||||
{t('plugin.detailPanel.operation.detail')}
|
||||
<RiArrowRightUpLine className='ml-1 w-4 h-4' />
|
||||
</a>
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
'use client'
|
||||
import React from 'react'
|
||||
import type { FC } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { RiArrowRightUpLine, RiVerifiedBadgeLine } from '@remixicon/react'
|
||||
import Badge from '../base/badge'
|
||||
import type { Plugin } from './types'
|
||||
|
@ -22,6 +23,7 @@ const ProviderCard: FC<Props> = ({
|
|||
className,
|
||||
payload,
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
const language = useGetLanguage()
|
||||
const { org, label } = payload
|
||||
|
||||
|
@ -57,14 +59,14 @@ const ProviderCard: FC<Props> = ({
|
|||
className='flex-grow'
|
||||
variant='primary'
|
||||
>
|
||||
Install
|
||||
{t('plugin.detailPanel.operation.install')}
|
||||
</Button>
|
||||
<Button
|
||||
className='flex-grow'
|
||||
variant='secondary'
|
||||
>
|
||||
<a href={`${MARKETPLACE_URL_PREFIX}/plugin/${payload.org}/${payload.name}`} target='_blank' className='flex items-center gap-0.5'>
|
||||
Details
|
||||
{t('plugin.detailPanel.operation.detail')}
|
||||
<RiArrowRightUpLine className='w-4 h-4' />
|
||||
</a>
|
||||
</Button>
|
||||
|
|
|
@ -13,7 +13,7 @@ const translation = {
|
|||
},
|
||||
operation: {
|
||||
install: 'Install',
|
||||
detail: 'Detail',
|
||||
detail: 'Details',
|
||||
update: 'Update',
|
||||
info: 'Plugin Info',
|
||||
checkUpdate: 'Check Update',
|
||||
|
|
Loading…
Reference in New Issue
Block a user