fix: hide empty description and fix broken skill link for skills.sh results

- Hide "暂无描述" text when skill has no description (skills.sh API
  doesn't return descriptions), show empty spacer instead
- Change skills.sh result link from guessed subdirectory path to repo
  root URL, since skillId doesn't reflect the actual nested path
This commit is contained in:
Jason
2026-04-05 22:41:27 +08:00
parent d51e774b20
commit 2d581bce91
2 changed files with 11 additions and 7 deletions
+9 -5
View File
@@ -108,11 +108,15 @@ export function SkillCard({
)}
</div>
</CardHeader>
<CardContent className="flex-1 pt-0">
<p className="text-sm text-muted-foreground/90 line-clamp-4 leading-relaxed">
{skill.description || t("skills.noDescription")}
</p>
</CardContent>
{skill.description ? (
<CardContent className="flex-1 pt-0">
<p className="text-sm text-muted-foreground/90 line-clamp-4 leading-relaxed">
{skill.description}
</p>
</CardContent>
) : (
<div className="flex-1" />
)}
<CardFooter className="flex gap-2 pt-3 border-t border-border/50 relative z-10">
{skill.readmeUrl && (
<Button