enh: password valve type
This commit is contained in:
1 parent
8eebc2aea6
commit
8c70453b2e
1 file changed
+14
-1
@@ -4,6 +4,7 @@
|
|||||||
const i18n = getContext('i18n');
|
const i18n = getContext('i18n');
|
||||||
|
|
||||||
import Switch from './Switch.svelte';
|
import Switch from './Switch.svelte';
|
||||||
|
import SensitiveInput from './SensitiveInput.svelte';
|
||||||
import MapSelector from './Valves/MapSelector.svelte';
|
import MapSelector from './Valves/MapSelector.svelte';
|
||||||
|
|
||||||
export let valvesSpec = null;
|
export let valvesSpec = null;
|
||||||
@@ -103,7 +104,19 @@
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{:else if valvesSpec.properties[property]?.input ?? null}
|
{: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="flex items-center space-x-2">
|
||||||
<div class="relative size-6">
|
<div class="relative size-6">
|
||||||
<input
|
<input
|
||||||
|
|||||||
Reference in new issue
Block a user