fix: obscure critical config variables

This commit is contained in:
Elias Schneider
2022-12-08 19:14:06 +01:00
parent 1f63f22591
commit bfb0d151ea
9 changed files with 29 additions and 25 deletions

View File

@@ -2,6 +2,7 @@ import {
Button,
Code,
NumberInput,
PasswordInput,
Select,
Space,
Stack,
@@ -53,9 +54,12 @@ const Body = ({
<Text>
Set <Code>{configVariable.key}</Code> to
</Text>
{configVariable.type == "string" && (
<TextInput label="Value" {...form.getInputProps("stringValue")} />
)}
{configVariable.type == "string" &&
(configVariable.obscured ? (
<PasswordInput label="Value" {...form.getInputProps("stringValue")} />
) : (
<TextInput label="Value" {...form.getInputProps("stringValue")} />
))}
{configVariable.type == "number" && (
<NumberInput label="Value" {...form.getInputProps("numberValue")} />
)}