From 439ab7a33568c51250cc3ce40edfffb05090875e Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 1 Jul 2024 22:18:45 -0700 Subject: [PATCH] refac --- .../admin/Settings/Pipelines.svelte | 42 +++++++++++++++---- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/lib/components/admin/Settings/Pipelines.svelte b/src/lib/components/admin/Settings/Pipelines.svelte index 6826cb92b..22ebc707c 100644 --- a/src/lib/components/admin/Settings/Pipelines.svelte +++ b/src/lib/components/admin/Settings/Pipelines.svelte @@ -19,6 +19,7 @@ } from '$lib/apis'; import Spinner from '$lib/components/common/Spinner.svelte'; + import Switch from '$lib/components/common/Switch.svelte'; const i18n: Writable = getContext('i18n'); @@ -476,15 +477,40 @@ {#if (valves[property] ?? null) !== null} -
+ +
- + {#if valvesSpec.properties[property]?.enum ?? null} + + {:else if (valvesSpec.properties[property]?.type ?? null) === 'boolean'} +
+
+ {valves[property] ? 'Enabled' : 'Disabled'} +
+ +
+ +
+
+ {:else} + + {/if}
{/if}