diff --git a/src/lib/components/admin/Functions.svelte b/src/lib/components/admin/Functions.svelte index 78365c832..5e60dfc9e 100644 --- a/src/lib/components/admin/Functions.svelte +++ b/src/lib/components/admin/Functions.svelte @@ -49,6 +49,8 @@ let showConfirm = false; let query = ''; + let selectedType = 'all'; + let showManifestModal = false; let showValvesModal = false; let selectedFunction = null; @@ -59,9 +61,10 @@ $: filteredItems = $functions .filter( (f) => - query === '' || - f.name.toLowerCase().includes(query.toLowerCase()) || - f.id.toLowerCase().includes(query.toLowerCase()) + (selectedType !== 'all' ? f.type === selectedType : true) && + (query === '' || + f.name.toLowerCase().includes(query.toLowerCase()) || + f.id.toLowerCase().includes(query.toLowerCase())) ) .sort((a, b) => a.type.localeCompare(b.type) || a.name.localeCompare(b.name)); @@ -219,8 +222,8 @@ }} /> -
-
+
+
{$i18n.t('Functions')}
@@ -270,12 +273,54 @@
+ +
+
+ + + + + + + +
+
{#each filteredItems as func (func.id)}