add id searching to extension list (#739)

* add id searching and baseurl

* reuse searchfield instead

* fix conflict

* remove baseurl
This commit is contained in:
Seishirou101 2021-09-11 17:16:26 -05:00 committed by GitHub
parent 504b32e7fa
commit 942574939f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -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);
}

View File

@ -1,6 +1,6 @@
<template>
<span class="filters-list">
<ElInput v-model="filters.search" placeholder="Search extensions by name..." clearable />
<ElInput v-model="filters.search" placeholder="Search extensions by name or ID..." clearable />
<ElSelect v-model="filters.lang" placeholder="Show specific languages..." multiple clearable>
<ElOption