feat: add entry point for requesting a plugin (#20026)

This commit is contained in:
Nite Knite 2025-05-22 14:15:00 +08:00 committed by GitHub
parent 9afd7f6c87
commit 916c415b4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 20 additions and 5 deletions

View File

@ -33,16 +33,17 @@ const DifyLogo: FC<DifyLogoProps> = ({
const { theme } = useTheme() const { theme } = useTheme()
const themedStyle = (theme === 'dark' && style === 'default') ? 'monochromeWhite' : style const themedStyle = (theme === 'dark' && style === 'default') ? 'monochromeWhite' : style
const { systemFeatures } = useGlobalPublicStore() const { systemFeatures } = useGlobalPublicStore()
const hasBrandingLogo = Boolean(systemFeatures.branding.enabled && systemFeatures.branding.workspace_logo)
let src = `${basePath}${logoPathMap[themedStyle]}` let src = `${basePath}${logoPathMap[themedStyle]}`
if (systemFeatures.branding.enabled) if (hasBrandingLogo)
src = systemFeatures.branding.workspace_logo src = systemFeatures.branding.workspace_logo
return ( return (
<img <img
src={src} src={src}
className={classNames('block object-contain', logoSizeMap[size], className)} className={classNames('block object-contain', logoSizeMap[size], hasBrandingLogo && 'w-auto', className)}
alt='Dify logo' alt={hasBrandingLogo ? 'Logo' : 'Dify logo'}
/> />
) )
} }

View File

@ -60,7 +60,7 @@ const Header = () => {
{ {
!isMobile !isMobile
&& <div className='flex shrink-0 items-center gap-1.5 self-stretch pl-3'> && <div className='flex shrink-0 items-center gap-1.5 self-stretch pl-3'>
<Link href="/apps" className='flex h-8 w-[52px] shrink-0 items-center justify-center gap-2'> <Link href="/apps" className='flex h-8 shrink-0 items-center justify-center gap-2 px-0.5'>
<DifyLogo /> <DifyLogo />
</Link> </Link>
<div className='font-light text-divider-deep'>/</div> <div className='font-light text-divider-deep'>/</div>

View File

@ -186,6 +186,17 @@ const PluginPage = ({
{ {
isExploringMarketplace && ( isExploringMarketplace && (
<> <>
<Link
href='https://github.com/langgenius/dify-plugins/issues/new?template=plugin_request.yaml'
target='_blank'
>
<Button
variant='ghost'
className='text-text-tertiary'
>
{t('plugin.requestAPlugin')}
</Button>
</Link>
<Link <Link
href={getDocsUrl(locale, '/plugins/publish-plugins/publish-to-dify-marketplace/README')} href={getDocsUrl(locale, '/plugins/publish-plugins/publish-to-dify-marketplace/README')}
target='_blank' target='_blank'
@ -198,7 +209,7 @@ const PluginPage = ({
{t('plugin.submitPlugin')} {t('plugin.submitPlugin')}
</Button> </Button>
</Link> </Link>
<div className='mx-2 h-3.5 w-[1px] bg-divider-regular'></div> <div className='mx-1 h-3.5 w-[1px] shrink-0 bg-divider-regular'></div>
</> </>
) )
} }

View File

@ -208,6 +208,7 @@ const translation = {
installedError: '{{errorLength}} plugins failed to install', installedError: '{{errorLength}} plugins failed to install',
clearAll: 'Clear all', clearAll: 'Clear all',
}, },
requestAPlugin: 'Request a plugin',
submitPlugin: 'Submit plugin', submitPlugin: 'Submit plugin',
difyVersionNotCompatible: 'The current Dify version is not compatible with this plugin, please upgrade to the minimum version required: {{minimalDifyVersion}}', difyVersionNotCompatible: 'The current Dify version is not compatible with this plugin, please upgrade to the minimum version required: {{minimalDifyVersion}}',
} }

View File

@ -208,6 +208,7 @@ const translation = {
installedError: '{{errorLength}} 个插件安装失败', installedError: '{{errorLength}} 个插件安装失败',
clearAll: '清除所有', clearAll: '清除所有',
}, },
requestAPlugin: '申请插件',
submitPlugin: '上传插件', submitPlugin: '上传插件',
difyVersionNotCompatible: '当前 Dify 版本不兼容该插件,其最低版本要求为 {{minimalDifyVersion}}', difyVersionNotCompatible: '当前 Dify 版本不兼容该插件,其最低版本要求为 {{minimalDifyVersion}}',
} }

View File

@ -191,6 +191,7 @@ const translation = {
clearAll: '全部清除', clearAll: '全部清除',
installing: '安裝 {{installingLength}} 個外掛程式0 個完成。', installing: '安裝 {{installingLength}} 個外掛程式0 個完成。',
}, },
requestAPlugin: '申请外掛程式',
submitPlugin: '提交外掛程式', submitPlugin: '提交外掛程式',
findMoreInMarketplace: '在 Marketplace 中查找更多內容', findMoreInMarketplace: '在 Marketplace 中查找更多內容',
installPlugin: '安裝外掛程式', installPlugin: '安裝外掛程式',