diff --git a/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsx b/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsx index f8b4f63924..9cc5af589b 100644 --- a/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsx +++ b/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsx @@ -12,6 +12,7 @@ import { PortalToFollowElemTrigger, } from '@/app/components/base/portal-to-follow-elem' import cn from '@/utils/classnames' +import { useGlobalPublicStore } from '@/context/global-public-context' type Props = { source: PluginSource @@ -40,6 +41,8 @@ const OperationDropdown: FC = ({ setOpen(!openRef.current) }, [setOpen]) + const { enable_marketplace } = useGlobalPublicStore(s => s.systemFeatures) + return ( = ({ className='system-md-regular cursor-pointer rounded-lg px-3 py-1.5 text-text-secondary hover:bg-state-base-hover' >{t('plugin.detailPanel.operation.checkUpdate')} )} - {(source === PluginSource.marketplace || source === PluginSource.github) && ( + {(source === PluginSource.marketplace || source === PluginSource.github) && enable_marketplace && ( {t('plugin.detailPanel.operation.viewDetail')} )} - {(source === PluginSource.marketplace || source === PluginSource.github) && ( + {(source === PluginSource.marketplace || source === PluginSource.github) && enable_marketplace && (
)}
= ({ const getValueFromI18nObject = useRenderI18nObject() const title = getValueFromI18nObject(label) const descriptionText = getValueFromI18nObject(description) + const { enable_marketplace } = useGlobalPublicStore(s => s.systemFeatures) return (
= ({ } - {source === PluginSource.marketplace + {source === PluginSource.marketplace && enable_marketplace && <>
{t('plugin.from')} marketplace