From 942574939f2808b5c77ad4a9100650036a266e5f Mon Sep 17 00:00:00 2001 From: Seishirou101 <57241064+Seishirou101@users.noreply.github.com> Date: Sat, 11 Sep 2021 17:16:26 -0500 Subject: [PATCH] add id searching to extension list (#739) * add id searching and baseurl * reuse searchfield instead * fix conflict * remove baseurl --- src/.vuepress/components/Extensions.vue | 5 ++--- src/.vuepress/components/Filters.vue | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/.vuepress/components/Extensions.vue b/src/.vuepress/components/Extensions.vue index 98bf1c76..73c662b3 100644 --- a/src/.vuepress/components/Extensions.vue +++ b/src/.vuepress/components/Extensions.vue @@ -39,10 +39,10 @@ export default { if (filters.search) { filteredGroup = filteredGroup.filter((ext) => - ext.name.toLowerCase().includes(filters.search.toLowerCase()) + ext.name.toLowerCase().includes(filters.search.toLowerCase()) || + ext.sources.some((source) => source.id.includes(filters.search)) ); } - filteredGroup = filteredGroup.filter((ext) => filters.nsfw === "Don't care" ? true : ext.nsfw === (filters.nsfw === "Yes" ? 1 : 0) ); @@ -50,7 +50,6 @@ export default { if (filters.sort && filters.sort === "Descending") { filteredGroup = filteredGroup.reverse(); } - if (filteredGroup.length) { filtered.push(filteredGroup); } diff --git a/src/.vuepress/components/Filters.vue b/src/.vuepress/components/Filters.vue index f69707ec..750917c7 100644 --- a/src/.vuepress/components/Filters.vue +++ b/src/.vuepress/components/Filters.vue @@ -1,6 +1,6 @@