From f004bc8aaf574435c36516c33c51235b98dcef63 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Mon, 18 May 2020 13:14:30 +0200 Subject: [PATCH] :bug: Fix display issue on failed oauth connect #PROD-95 --- packages/editor-ui/src/components/CredentialsInput.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/CredentialsInput.vue b/packages/editor-ui/src/components/CredentialsInput.vue index ce8002cd04..db9f643d52 100644 --- a/packages/editor-ui/src/components/CredentialsInput.vue +++ b/packages/editor-ui/src/components/CredentialsInput.vue @@ -336,6 +336,12 @@ export default mixins( if (credentialData === null) { return; } + + // Set the internal data directly so that even if it fails it displays a "Save" instead + // of the "Create" button. If that would not be done, people could not retry after a + // connect issue as it woult try to create credentials again which would fail as they + // exist already. + Vue.set(this, 'credentialDataTemp', credentialData); } else { // Exists already but got maybe changed. So save first credentialData = await this.updateCredentials(false) as ICredentialsDecryptedResponse; @@ -515,7 +521,7 @@ export default mixins( .oauth-information { line-height: 2.5em; - margin-top: 2em; + margin: 2em 0; } .parameter-wrapper {