Implement plugin tags

This commit is contained in:
V 2023-05-12 03:41:00 +02:00
parent 3c7496ac6d
commit ade31f993b
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
7 changed files with 25 additions and 4 deletions

View file

@ -228,9 +228,12 @@ export default function PluginSettings() {
if (enabled && searchValue.status === SearchStatus.DISABLED) return false;
if (!enabled && searchValue.status === SearchStatus.ENABLED) return false;
if (!searchValue.value.length) return true;
const v = searchValue.value.toLowerCase();
return (
plugin.name.toLowerCase().includes(searchValue.value.toLowerCase()) ||
plugin.description.toLowerCase().includes(searchValue.value.toLowerCase())
plugin.name.toLowerCase().includes(v) ||
plugin.description.toLowerCase().includes(v) ||
plugin.tags?.some(t => t.toLowerCase().includes(v))
);
};