From 2af1c24ead4c02e0588d4c2dfcf4a289f54388d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Tue, 18 Jul 2023 11:43:28 +0200 Subject: [PATCH] feat: Allow hiding credential params on cloud (#6687) --- .../src/components/CredentialEdit/CredentialEdit.vue | 4 ++++ .../credentials/GoogleSheetsOAuth2Api.credentials.ts | 3 +++ .../credentials/GoogleSheetsTriggerOAuth2Api.credentials.ts | 3 +++ packages/workflow/src/Interfaces.ts | 2 ++ 4 files changed, 12 insertions(+) diff --git a/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue b/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue index 02dcf89a8a..1afeede923 100644 --- a/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue +++ b/packages/editor-ui/src/components/CredentialEdit/CredentialEdit.vue @@ -554,6 +554,10 @@ export default defineComponent({ return false; } + if (parameter.displayOptions?.hideOnCloud && this.settingsStore.isCloudDeployment) { + return false; + } + if (parameter.displayOptions === undefined) { // If it is not defined no need to do a proper check return true; diff --git a/packages/nodes-base/credentials/GoogleSheetsOAuth2Api.credentials.ts b/packages/nodes-base/credentials/GoogleSheetsOAuth2Api.credentials.ts index 1744613a59..a80b5c7616 100644 --- a/packages/nodes-base/credentials/GoogleSheetsOAuth2Api.credentials.ts +++ b/packages/nodes-base/credentials/GoogleSheetsOAuth2Api.credentials.ts @@ -28,6 +28,9 @@ export class GoogleSheetsOAuth2Api implements ICredentialType { name: 'notice', type: 'notice', default: '', + displayOptions: { + hideOnCloud: true, + }, }, ]; } diff --git a/packages/nodes-base/credentials/GoogleSheetsTriggerOAuth2Api.credentials.ts b/packages/nodes-base/credentials/GoogleSheetsTriggerOAuth2Api.credentials.ts index b5ee15101f..f5d83423ed 100644 --- a/packages/nodes-base/credentials/GoogleSheetsTriggerOAuth2Api.credentials.ts +++ b/packages/nodes-base/credentials/GoogleSheetsTriggerOAuth2Api.credentials.ts @@ -29,6 +29,9 @@ export class GoogleSheetsTriggerOAuth2Api implements ICredentialType { name: 'notice', type: 'notice', default: '', + displayOptions: { + hideOnCloud: true, + }, }, ]; } diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index 83e5046635..c71e350294 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -1090,6 +1090,8 @@ export interface IDisplayOptions { show?: { [key: string]: NodeParameterValue[] | undefined; }; + + hideOnCloud?: boolean; } export interface INodeProperties {