mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 07:25:48 +01:00
🐛 Implement clearing for credentials
This commit is contained in:
@@ -104,7 +104,15 @@ export const GenericSecretInput = ({
|
|||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col xs={12} md={6}>
|
<Grid.Col xs={12} md={6}>
|
||||||
<Flex gap={10} justify="end" align="end">
|
<Flex gap={10} justify="end" align="end">
|
||||||
<Button variant="subtle" color="gray" px="xl">
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
setDisplayUpdateField(false);
|
||||||
|
onClickUpdateButton(undefined);
|
||||||
|
}}
|
||||||
|
variant="subtle"
|
||||||
|
color="gray"
|
||||||
|
px="xl"
|
||||||
|
>
|
||||||
{t('integration.secrets.clear')}
|
{t('integration.secrets.clear')}
|
||||||
</Button>
|
</Button>
|
||||||
{displayUpdateField === true ? (
|
{displayUpdateField === true ? (
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ export const IntegrationOptionsRenderer = ({ form }: IntegrationOptionsRendererP
|
|||||||
<GenericSecretInput
|
<GenericSecretInput
|
||||||
onClickUpdateButton={(value) => {
|
onClickUpdateButton={(value) => {
|
||||||
form.setFieldValue(`integration.properties.${index}.value`, value);
|
form.setFieldValue(`integration.properties.${index}.value`, value);
|
||||||
|
form.setFieldValue(`integration.properties.${index}.isDefined`, value !== undefined);
|
||||||
}}
|
}}
|
||||||
key={`input-${property}`}
|
key={`input-${property}`}
|
||||||
label={`${property} (potentionally unmapped)`}
|
label={`${property} (potentionally unmapped)`}
|
||||||
@@ -68,6 +69,7 @@ export const IntegrationOptionsRenderer = ({ form }: IntegrationOptionsRendererP
|
|||||||
<GenericSecretInput
|
<GenericSecretInput
|
||||||
onClickUpdateButton={(value) => {
|
onClickUpdateButton={(value) => {
|
||||||
form.setFieldValue(`integration.properties.${index}.value`, value);
|
form.setFieldValue(`integration.properties.${index}.value`, value);
|
||||||
|
form.setFieldValue(`integration.properties.${index}.isDefined`, value !== undefined);
|
||||||
}}
|
}}
|
||||||
key={`input-${definition.label}`}
|
key={`input-${definition.label}`}
|
||||||
label={definition.label}
|
label={definition.label}
|
||||||
|
|||||||
Reference in New Issue
Block a user