From b7294e9cbc24ee3546af4e02d0dbff447bcdd9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karolina=20Ku=C5=BAniewicz?= Date: Wed, 11 Nov 2020 12:40:16 +0100 Subject: [PATCH] Support multiline text in plugin configuration secret field --- schema.graphql | 3 ++- .../components/PluginAuthorization/PluginAuthorization.tsx | 3 ++- .../PluginSecretFieldDialog/PluginSecretFieldDialog.tsx | 3 +++ src/plugins/utils.ts | 3 ++- src/types/globalTypes.ts | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/schema.graphql b/schema.graphql index e536c91da..10b947e2e 100644 --- a/schema.graphql +++ b/schema.graphql @@ -1147,6 +1147,7 @@ enum ConfigurationTypeFieldEnum { STRING BOOLEAN SECRET + SECRETMULTILINE PASSWORD } @@ -5241,4 +5242,4 @@ union _Entity = Address | User | Group | App | ProductVariant | Product | Produc type _Service { sdl: String -} +} \ No newline at end of file diff --git a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx index a1b9cbdfb..3f01bd99a 100644 --- a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx +++ b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx @@ -59,7 +59,8 @@ const PluginAuthorization: React.FC = props => { {secretFields.map((field, fieldIndex) => (
- {field.type === ConfigurationTypeFieldEnum.SECRET ? ( + {field.type === ConfigurationTypeFieldEnum.SECRET || + field.type === ConfigurationTypeFieldEnum.SECRETMULTILINE ? (
{field.label} {field.value !== null && ( diff --git a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx index 1b19a7770..9d8a4c8ae 100644 --- a/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx +++ b/src/plugins/components/PluginSecretFieldDialog/PluginSecretFieldDialog.tsx @@ -63,6 +63,9 @@ const PluginSecretFieldDialog: React.FC = ({ <> configField.name === field).type); } diff --git a/src/types/globalTypes.ts b/src/types/globalTypes.ts index 14327e9df..452466c94 100644 --- a/src/types/globalTypes.ts +++ b/src/types/globalTypes.ts @@ -125,6 +125,7 @@ export enum ConfigurationTypeFieldEnum { BOOLEAN = "BOOLEAN", PASSWORD = "PASSWORD", SECRET = "SECRET", + SECRETMULTILINE = "SECRETMULTILINE", STRING = "STRING", }