mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-27 08:14:33 +08:00
fix(skill): change search to match name and repo instead of description
This commit is contained in:
@@ -213,14 +213,11 @@ export const SkillsPage = forwardRef<SkillsPageHandle, SkillsPageProps>(
|
||||
const query = searchQuery.toLowerCase();
|
||||
return byStatus.filter((skill) => {
|
||||
const name = skill.name?.toLowerCase() || "";
|
||||
const description = skill.description?.toLowerCase() || "";
|
||||
const directory = skill.directory?.toLowerCase() || "";
|
||||
const repo = skill.repoOwner && skill.repoName
|
||||
? `${skill.repoOwner}/${skill.repoName}`.toLowerCase()
|
||||
: "";
|
||||
|
||||
return (
|
||||
name.includes(query) ||
|
||||
description.includes(query) ||
|
||||
directory.includes(query)
|
||||
);
|
||||
return name.includes(query) || repo.includes(query);
|
||||
});
|
||||
}, [skills, searchQuery, filterRepo, filterStatus]);
|
||||
|
||||
|
||||
@@ -1143,7 +1143,7 @@
|
||||
"skillCount": "{{count}} skills detected"
|
||||
},
|
||||
"search": "Search Skills",
|
||||
"searchPlaceholder": "Search skill name or description...",
|
||||
"searchPlaceholder": "Search skill name or repo...",
|
||||
"filter": {
|
||||
"placeholder": "Filter by status",
|
||||
"all": "All",
|
||||
|
||||
@@ -1141,7 +1141,7 @@
|
||||
"skillCount": "{{count}} 件のスキルを検出"
|
||||
},
|
||||
"search": "スキルを検索",
|
||||
"searchPlaceholder": "スキル名または説明で検索...",
|
||||
"searchPlaceholder": "スキル名またはリポジトリで検索...",
|
||||
"filter": {
|
||||
"placeholder": "状態で絞り込み",
|
||||
"all": "すべて",
|
||||
|
||||
@@ -1143,7 +1143,7 @@
|
||||
"skillCount": "识别到 {{count}} 个技能"
|
||||
},
|
||||
"search": "搜索技能",
|
||||
"searchPlaceholder": "搜索技能名称或描述...",
|
||||
"searchPlaceholder": "搜索技能名称或仓库名称...",
|
||||
"filter": {
|
||||
"placeholder": "状态筛选",
|
||||
"all": "全部",
|
||||
|
||||
Reference in New Issue
Block a user