From f755f5e51271a4b6632a79f42901924bdc687265 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 25 May 2024 23:52:17 -0700 Subject: [PATCH] feat: model search support --- src/lib/components/workspace/Models.svelte | 49 +++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/src/lib/components/workspace/Models.svelte b/src/lib/components/workspace/Models.svelte index 963ab7083..3bc96b541 100644 --- a/src/lib/components/workspace/Models.svelte +++ b/src/lib/components/workspace/Models.svelte @@ -20,6 +20,8 @@ let importFiles; let modelsImportInputElement: HTMLInputElement; + let searchValue = ''; + const deleteModelHandler = async (model) => { console.log(model.info); if (!model?.info) { @@ -97,6 +99,49 @@
{$i18n.t('Models')}
+
+
+
+ + + +
+ +
+ +
+ + + + + +
+
+
+
- {#each $models as model} + {#each $models.filter((m) => searchValue === '' || m.name + .toLowerCase() + .includes(searchValue.toLowerCase())) as model}