Skip to content

Commit b67451d

Browse files
authored
fix: add file checkbox for multi-user configuration (#4115)
Signed-off-by: Donnie Adams <[email protected]>
1 parent ab6137b commit b67451d

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

ui/user/src/lib/components/admin/CatalogServerForm.svelte

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -760,16 +760,26 @@
760760
</div>
761761
<div class="flex w-full flex-col gap-1">
762762
<label for={`env-value-${i}`} class="text-sm font-light">Value</label>
763-
<input
764-
id={`env-value-${i}`}
765-
class="text-input-filled w-full"
766-
bind:value={formData.env[i].value}
767-
placeholder="e.g. 123abcdef456"
768-
disabled={readonly}
769-
type={formData.env[i].sensitive ? 'password' : 'text'}
770-
/>
763+
{#if formData.env[i].file}
764+
<textarea
765+
id={`env-value-${i}`}
766+
class="text-input-filled min-h-24 w-full resize-y"
767+
bind:value={formData.env[i].value}
768+
disabled={readonly}
769+
rows={formData.env[i].value.split('\n').length + 1}
770+
></textarea>
771+
{:else}
772+
<input
773+
id={`env-value-${i}`}
774+
class="text-input-filled w-full"
775+
bind:value={formData.env[i].value}
776+
placeholder="e.g. 123abcdef456"
777+
disabled={readonly}
778+
type={formData.env[i].sensitive ? 'password' : 'text'}
779+
/>
780+
{/if}
771781
</div>
772-
<div>
782+
<div class="flex w-full gap-4">
773783
<label class="flex items-center gap-2">
774784
<input
775785
type="checkbox"
@@ -778,6 +788,10 @@
778788
/>
779789
<span class="text-sm">Sensitive</span>
780790
</label>
791+
<label class="flex items-center gap-2">
792+
<input type="checkbox" bind:checked={formData.env[i].file} disabled={readonly} />
793+
<span class="text-sm">File</span>
794+
</label>
781795
</div>
782796
</div>
783797
{/if}

0 commit comments

Comments
 (0)