diff --git a/src/components/Dashboard/Modals/EditService/Tabs/IntegrationTab/Components/InputElements/GenericSecretInput.tsx b/src/components/Dashboard/Modals/EditService/Tabs/IntegrationTab/Components/InputElements/GenericSecretInput.tsx index c7a5c6f82..a87b96d8b 100644 --- a/src/components/Dashboard/Modals/EditService/Tabs/IntegrationTab/Components/InputElements/GenericSecretInput.tsx +++ b/src/components/Dashboard/Modals/EditService/Tabs/IntegrationTab/Components/InputElements/GenericSecretInput.tsx @@ -1,18 +1,16 @@ import { - ActionIcon, Button, Card, createStyles, Flex, Grid, Group, + PasswordInput, Stack, - TextInput, ThemeIcon, Title, - Tooltip, } from '@mantine/core'; -import { IconDeviceFloppy, TablerIcon } from '@tabler/icons'; +import { TablerIcon } from '@tabler/icons'; import { useState } from 'react'; interface GenericSecretInputProps { @@ -27,12 +25,13 @@ export const GenericSecretInput = ({ value, setIcon, onClickUpdateButton, + ...props }: GenericSecretInputProps) => { const { classes } = useStyles(); const Icon = setIcon; - const [fieldValue, setFieldValue] = useState(value); + const [displayUpdateField, setDisplayUpdateField] = useState(false); return ( @@ -51,31 +50,16 @@ export const GenericSecretInput = ({ - - setFieldValue(event.currentTarget.value)} - rightSection={ - - onClickUpdateButton(fieldValue)}> - - - - } - value={fieldValue} - type="password" - placeholder="no value is set" - withAsterisk - /> + {displayUpdateField === true ? ( + + ) : ( + + )} diff --git a/src/components/Dashboard/Modals/EditService/Tabs/IntegrationTab/Components/IntegrationOptionsRenderer/IntegrationOptionsRenderer.tsx b/src/components/Dashboard/Modals/EditService/Tabs/IntegrationTab/Components/IntegrationOptionsRenderer/IntegrationOptionsRenderer.tsx index a07880ffe..6f9883902 100644 --- a/src/components/Dashboard/Modals/EditService/Tabs/IntegrationTab/Components/IntegrationOptionsRenderer/IntegrationOptionsRenderer.tsx +++ b/src/components/Dashboard/Modals/EditService/Tabs/IntegrationTab/Components/IntegrationOptionsRenderer/IntegrationOptionsRenderer.tsx @@ -56,6 +56,7 @@ export const IntegrationOptionsRenderer = ({ form }: IntegrationOptionsRendererP label={`${property} (potentionally unmapped)`} secretIsPresent={isPresent} setIcon={IconKey} + value={formValue.value} {...form.getInputProps(`integration.properties.${index}.value`)} /> );