From 696f35688162d2f171b848f443acd5fb72c706f2 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 30 Nov 2025 08:12:22 -0500 Subject: [PATCH] refac --- .../workspace/Models/ModelEditor.svelte | 60 ++++++++++--------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/lib/components/workspace/Models/ModelEditor.svelte b/src/lib/components/workspace/Models/ModelEditor.svelte index d46a28b3df..6c4eda9d32 100644 --- a/src/lib/components/workspace/Models/ModelEditor.svelte +++ b/src/lib/components/workspace/Models/ModelEditor.svelte @@ -720,40 +720,46 @@ -
+ {#if $functions.filter((func) => func.type === 'filter').length > 0 || $functions.filter((func) => func.type === 'action').length > 0} +
-
- func.type === 'filter')} - /> -
- - {#if filterIds.length > 0} - {@const toggleableFilters = $functions.filter( - (func) => - func.type === 'filter' && - (filterIds.includes(func.id) || func?.is_global) && - func?.meta?.toggle - )} - - {#if toggleableFilters.length > 0} + {#if $functions.filter((func) => func.type === 'filter').length > 0}
- func.type === 'filter')} + /> +
+ + {#if filterIds.length > 0} + {@const toggleableFilters = $functions.filter( + (func) => + func.type === 'filter' && + (filterIds.includes(func.id) || func?.is_global) && + func?.meta?.toggle + )} + + {#if toggleableFilters.length > 0} +
+ +
+ {/if} + {/if} + {/if} + + {#if $functions.filter((func) => func.type === 'action').length > 0} +
+ func.type === 'action')} />
{/if} {/if} -
- func.type === 'action')} - /> -
-