fix(webui): hide SkillHub install counts

This commit is contained in:
Xubin Ren
2026-08-29 15:29:18 +08:00
parent caab883f9f
commit 65f2a6dbf5
2 changed files with 17 additions and 12 deletions
@@ -527,18 +527,22 @@ function MarketplaceSkillRow({
<div className="mt-1 flex min-w-0 items-center gap-1.5 truncate text-[12px] text-muted-foreground"> <div className="mt-1 flex min-w-0 items-center gap-1.5 truncate text-[12px] text-muted-foreground">
{skill.source} {skill.source}
{skill.version ? <span>· v{skill.version}</span> : null} {skill.version ? <span>· v{skill.version}</span> : null}
<span>·</span> {skill.provider === "skills_sh" ? (
{skill.metric === "installs_24h" <>
? t("settings.skills.marketplaceInstalls24h", { <span>·</span>
count: skill.installs, {skill.metric === "installs_24h"
formattedCount: skill.installs.toLocaleString(), ? t("settings.skills.marketplaceInstalls24h", {
defaultValue: "{{formattedCount}} installs / 24h", count: skill.installs,
}) formattedCount: skill.installs.toLocaleString(),
: t("settings.skills.marketplaceInstalls", { defaultValue: "{{formattedCount}} installs / 24h",
count: skill.installs, })
formattedCount: skill.installs.toLocaleString(), : t("settings.skills.marketplaceInstalls", {
defaultValue: "{{formattedCount}} installs", count: skill.installs,
})} formattedCount: skill.installs.toLocaleString(),
defaultValue: "{{formattedCount}} installs",
})}
</>
) : null}
</div> </div>
</div> </div>
{skill.provider === "skills_sh" ? <TrendSparkline values={trend} /> : null} {skill.provider === "skills_sh" ? <TrendSparkline values={trend} /> : null}
+1
View File
@@ -1201,6 +1201,7 @@ describe("App layout", () => {
expect(screen.getAllByText("SkillHub")).toHaveLength(2); expect(screen.getAllByText("SkillHub")).toHaveLength(2);
expect(screen.getAllByText("skills.sh")).toHaveLength(2); expect(screen.getAllByText("skills.sh")).toHaveLength(2);
expect(screen.getByText(/14,481 installs \/ 24h/)).toBeInTheDocument(); expect(screen.getByText(/14,481 installs \/ 24h/)).toBeInTheDocument();
expect(screen.queryByText(/11,831 installs/)).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("tab", { name: "SkillHub" })); fireEvent.click(screen.getByRole("tab", { name: "SkillHub" }));
expect(screen.getByText("ima-skills")).toBeInTheDocument(); expect(screen.getByText("ima-skills")).toBeInTheDocument();
expect(screen.queryByText("find-skills")).not.toBeInTheDocument(); expect(screen.queryByText("find-skills")).not.toBeInTheDocument();