fix: hide marketplace information(#21275) (#21276)

Co-authored-by: Xiaoba Yu <xb1823725853@gmail.com>
This commit is contained in:
XiaoBa
2025-06-23 10:23:43 +08:00
committed by GitHub
parent a0a89b562c
commit 725a221315
2 changed files with 8 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ import { useAppContext } from '@/context/app-context'
import { gte } from 'semver'
import Tooltip from '@/app/components/base/tooltip'
import { getMarketplaceUrl } from '@/utils/var'
import { useGlobalPublicStore } from '@/context/global-public-context'
type Props = {
className?: string
@@ -75,6 +76,7 @@ const PluginItem: FC<Props> = ({
const getValueFromI18nObject = useRenderI18nObject()
const title = getValueFromI18nObject(label)
const descriptionText = getValueFromI18nObject(description)
const { enable_marketplace } = useGlobalPublicStore(s => s.systemFeatures)
return (
<div
@@ -165,7 +167,7 @@ const PluginItem: FC<Props> = ({
</a>
</>
}
{source === PluginSource.marketplace
{source === PluginSource.marketplace && enable_marketplace
&& <>
<a href={getMarketplaceUrl(`/plugins/${author}/${name}`, { theme })} target='_blank' className='flex items-center gap-0.5'>
<div className='system-2xs-medium-uppercase text-text-tertiary'>{t('plugin.from')} <span className='text-text-secondary'>marketplace</span></div>