format filter

This commit is contained in:
Sam Lavigne 2023-08-20 13:54:39 -04:00
parent d6d6e1e896
commit d445b891c8
1 changed files with 37 additions and 31 deletions

View File

@ -31,7 +31,7 @@
<div class="name"><h3>{filter.name}</h3></div> <div class="name"><h3>{filter.name}</h3></div>
<div> <div>
{#if filter.params && filter.params.length > 0} {#if filter.params && filter.params.length > 0}
<button on:click={() => show = !show}>{show ? "Hide" : "Show"} Options</button> <button on:click={() => (show = !show)}>{show ? "Hide" : "Show"} Options</button>
{/if} {/if}
<button on:click={remove}>X</button> <button on:click={remove}>X</button>
</div> </div>
@ -39,7 +39,7 @@
<div class="description"> <div class="description">
{filter.description} {filter.description}
<a style="color: #666" href="{url}" target="_blank">Full documentation.</a> <a style="color: #666" href={url} target="_blank">Full documentation.</a>
</div> </div>
{#if filter.params && filter.params.length > 0 && show} {#if filter.params && filter.params.length > 0 && show}
@ -59,7 +59,13 @@
{/each} {/each}
</select> </select>
{:else if p.type == "float" || p.type == "double" || p.type == "long" || p.type == "int"} {:else if p.type == "float" || p.type == "double" || p.type == "long" || p.type == "int"}
<input step={p.type == "int" ? 1 : 0.01 } type="range" min={p.min} max={p.max} bind:value={p.value} /> <input
step={p.type == "int" ? 1 : 0.01}
type="range"
min={p.min}
max={p.max}
bind:value={p.value}
/>
<input bind:value={p.value} /> <input bind:value={p.value} />
{:else} {:else}
<input bind:value={p.value} /> <input bind:value={p.value} />