diff --git a/web/app/components/plugins/plugin-detail-panel/detail-header.tsx b/web/app/components/plugins/plugin-detail-panel/detail-header.tsx index f99384100c..0127c0059f 100644 --- a/web/app/components/plugins/plugin-detail-panel/detail-header.tsx +++ b/web/app/components/plugins/plugin-detail-panel/detail-header.tsx @@ -79,6 +79,14 @@ const DetailHeader = ({ return false }, [isFromMarketplace, latest_version, version]) + const detailUrl = useMemo(() => { + if (isFromGitHub) + return `https://github.com/${meta!.repo}` + if (isFromMarketplace) + return `${MARKETPLACE_URL_PREFIX}/plugins/${author}/${name}` + return '' + }, [author, isFromGitHub, isFromMarketplace, meta, name]) + const [isShowUpdateModal, { setTrue: showUpdateModal, setFalse: hideUpdateModal, @@ -229,7 +237,7 @@ const DetailHeader = ({ onInfo={showPluginInfo} onCheckVersion={handleUpdate} onRemove={showDeleteConfirm} - detailUrl={`${MARKETPLACE_URL_PREFIX}/plugins/${author}/${name}`} + detailUrl={detailUrl} /> 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 05988c181d..422ff447a4 100644 --- a/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsx +++ b/web/app/components/plugins/plugin-detail-panel/operation-dropdown.tsx @@ -77,7 +77,7 @@ const OperationDropdown: FC = ({ className='px-3 py-1.5 rounded-lg text-text-secondary system-md-regular cursor-pointer hover:bg-state-base-hover' >{t('plugin.detailPanel.operation.checkUpdate')} )} - {source === PluginSource.marketplace && ( + {(source === PluginSource.marketplace || source === PluginSource.github) && ( {t('plugin.detailPanel.operation.viewDetail')}