enh: password valve type
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
import Switch from './Switch.svelte';
|
||||
import SensitiveInput from './SensitiveInput.svelte';
|
||||
import MapSelector from './Valves/MapSelector.svelte';
|
||||
|
||||
export let valvesSpec = null;
|
||||
@@ -103,7 +104,19 @@
|
||||
}}
|
||||
/>
|
||||
{:else if valvesSpec.properties[property]?.input ?? null}
|
||||
{#if valvesSpec.properties[property]?.input?.type === 'color'}
|
||||
{#if valvesSpec.properties[property]?.input?.type === 'password'}
|
||||
<div class="w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 border border-gray-100/30 dark:border-gray-850/30">
|
||||
<SensitiveInput
|
||||
id="valve-{property}"
|
||||
placeholder={valvesSpec.properties[property]?.description ?? ''}
|
||||
bind:value={valves[property]}
|
||||
required={(valvesSpec?.required ?? []).includes(property)}
|
||||
on:change={() => {
|
||||
dispatch('change');
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{:else if valvesSpec.properties[property]?.input?.type === 'color'}
|
||||
<div class="flex items-center space-x-2">
|
||||
<div class="relative size-6">
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user