diff --git a/ghproxy/public/search.html b/ghproxy/public/search.html index 7b1299e..63d1cd4 100644 --- a/ghproxy/public/search.html +++ b/ghproxy/public/search.html @@ -647,7 +647,15 @@ card.className = 'result-card'; // 构建显示名称 - const displayName = result.is_official ? result.name : `${result.namespace}/${result.name}`; + let displayName = result.name; + if (result.is_official) { + // 对于官方镜像,去掉 library/ 前缀 + displayName = result.name.replace('library/', ''); + } else { + // 对于非官方镜像,显示完整路径 + displayName = `${result.namespace}/${result.name}`; + } + const description = result.short_description || '暂无描述'; const starCount = result.star_count || 0; const pullCount = result.pull_count || 0; @@ -660,8 +668,8 @@ if (organization) badges.push(`By ${organization}`); const stats = []; - if (pullCount > 0) stats.push(`${formatNumber(pullCount)}+`); - if (starCount > 0) stats.push(`${formatNumber(starCount)}`); + if (starCount > 0) stats.push(``); + if (pullCount > 0) stats.push(``); card.innerHTML = `