mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
feat: Enhance plugin item links and increase value display width
This commit is contained in:
parent
bf2b9bb898
commit
133b487566
|
@ -46,7 +46,7 @@ const KeyValueItem: FC<Props> = ({
|
|||
<div className='flex items-center gap-1'>
|
||||
<span className={cn('flex flex-col justify-center items-start text-text-tertiary system-xs-medium', labelWidthClassName)}>{label}</span>
|
||||
<div className='flex justify-center items-center gap-0.5'>
|
||||
<span className='max-w-[140px] truncate system-xs-medium text-text-secondary'>
|
||||
<span className='max-w-[300px] truncate system-xs-medium text-text-secondary'>
|
||||
{value}
|
||||
</span>
|
||||
<Tooltip popupContent={t(`common.operation.${isCopied ? 'copied' : 'copy'}`)} position='top'>
|
||||
|
|
|
@ -20,7 +20,7 @@ import Title from '../card/base/title'
|
|||
import Action from './action'
|
||||
import cn from '@/utils/classnames'
|
||||
import I18n from '@/context/i18n'
|
||||
import { API_PREFIX } from '@/config'
|
||||
import { API_PREFIX, MARKETPLACE_URL_PREFIX } from '@/config'
|
||||
|
||||
type Props = {
|
||||
className?: string
|
||||
|
@ -112,7 +112,7 @@ const PluginItem: FC<Props> = ({
|
|||
<div className='flex items-center'>
|
||||
{source === PluginSource.github
|
||||
&& <>
|
||||
<a href='' target='_blank' className='flex items-center gap-1'>
|
||||
<a href={meta.repo} target='_blank' className='flex items-center gap-1'>
|
||||
<div className='text-text-tertiary system-2xs-medium-uppercase'>{t('plugin.from')}</div>
|
||||
<div className='flex items-center space-x-0.5 text-text-secondary'>
|
||||
<Github className='w-3 h-3' />
|
||||
|
@ -124,7 +124,7 @@ const PluginItem: FC<Props> = ({
|
|||
}
|
||||
{source === PluginSource.marketplace
|
||||
&& <>
|
||||
<a href='' target='_blank' className='flex items-center gap-0.5'>
|
||||
<a href={`${MARKETPLACE_URL_PREFIX}/plugin/${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>
|
||||
<RiArrowRightUpLine className='w-3 h-3' />
|
||||
</a>
|
||||
|
|
|
@ -41,6 +41,7 @@ else {
|
|||
export const API_PREFIX: string = apiPrefix
|
||||
export const PUBLIC_API_PREFIX: string = publicApiPrefix
|
||||
export const MARKETPLACE_API_PREFIX: string = marketplaceApiPrefix
|
||||
export const MARKETPLACE_URL_PREFIX: string = marketplaceUrlPrefix
|
||||
|
||||
const EDITION = process.env.NEXT_PUBLIC_EDITION || globalThis.document?.body?.getAttribute('data-public-edition') || 'SELF_HOSTED'
|
||||
export const IS_CE_EDITION = EDITION === 'SELF_HOSTED'
|
||||
|
|
Loading…
Reference in New Issue
Block a user