This commit is contained in:
Timothy Jaeryang Baek committed 2026-06-25 17:14:22 -04:00
1 parent 8f890f0b43
commit 7c0b0e42f5
1 file changed
+10 -4
+10 -4
View File
@@ -1,5 +1,8 @@
<script> <script>
import { onMount, getContext, createEventDispatcher } from 'svelte'; import { getContext, createEventDispatcher } from 'svelte';
import DOMPurify from 'dompurify';
import { marked } from 'marked';
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
const i18n = getContext('i18n'); const i18n = getContext('i18n');
@@ -12,7 +15,7 @@
</script> </script>
{#if valvesSpec && Object.keys(valvesSpec?.properties ?? {}).length} {#if valvesSpec && Object.keys(valvesSpec?.properties ?? {}).length}
{#each Object.keys(valvesSpec.properties) as property, idx} {#each Object.keys(valvesSpec.properties) as property}
<div class=" py-0.5 w-full justify-between"> <div class=" py-0.5 w-full justify-between">
<div class="flex w-full justify-between"> <div class="flex w-full justify-between">
<div class=" self-center text-xs font-medium"> <div class=" self-center text-xs font-medium">
@@ -213,8 +216,11 @@
{/if} {/if}
{#if (valvesSpec.properties[property]?.description ?? null) !== null} {#if (valvesSpec.properties[property]?.description ?? null) !== null}
<div class="text-xs text-gray-500"> <div class="markdown-prose-xs max-w-full text-gray-500 dark:text-gray-400">
{valvesSpec.properties[property].description} <!-- eslint-disable-next-line svelte/no-at-html-tags -->
{@html DOMPurify.sanitize(
marked.parse(valvesSpec.properties[property].description ?? '', { async: false })
)}
</div> </div>
{/if} {/if}
</div> </div>