| 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)} | |||||
| alt='Dify logo' | |||||
| className={classNames('block object-contain', logoSizeMap[size], hasBrandingLogo && 'w-auto', className)} | |||||
| alt={hasBrandingLogo ? 'Logo' : 'Dify logo'} | |||||
| /> | /> | ||||
| ) | ) | ||||
| } | } |
| { | { | ||||
| !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> |
| { | { | ||||
| 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' | ||||
| {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> | |||||
| </> | </> | ||||
| ) | ) | ||||
| } | } |
| 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}}', | ||||
| } | } |
| installedError: '{{errorLength}} 个插件安装失败', | installedError: '{{errorLength}} 个插件安装失败', | ||||
| clearAll: '清除所有', | clearAll: '清除所有', | ||||
| }, | }, | ||||
| requestAPlugin: '申请插件', | |||||
| submitPlugin: '上传插件', | submitPlugin: '上传插件', | ||||
| difyVersionNotCompatible: '当前 Dify 版本不兼容该插件,其最低版本要求为 {{minimalDifyVersion}}', | difyVersionNotCompatible: '当前 Dify 版本不兼容该插件,其最低版本要求为 {{minimalDifyVersion}}', | ||||
| } | } |
| clearAll: '全部清除', | clearAll: '全部清除', | ||||
| installing: '安裝 {{installingLength}} 個外掛程式,0 個完成。', | installing: '安裝 {{installingLength}} 個外掛程式,0 個完成。', | ||||
| }, | }, | ||||
| requestAPlugin: '申请外掛程式', | |||||
| submitPlugin: '提交外掛程式', | submitPlugin: '提交外掛程式', | ||||
| findMoreInMarketplace: '在 Marketplace 中查找更多內容', | findMoreInMarketplace: '在 Marketplace 中查找更多內容', | ||||
| installPlugin: '安裝外掛程式', | installPlugin: '安裝外掛程式', |