From a7530720b4e04533b7ff311380ed5af32cecff2e Mon Sep 17 00:00:00 2001 From: Ronald Langeveld Date: Tue, 15 Aug 2023 14:59:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20Unsplash=20integration?= =?UTF-8?q?=20toggle=20in=20Koenig=20editor=20(#17725)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit no issue - since Unsplash can be toggled on / off in integrations, we need to pass that to the Koenig-Lexical editor as well. --- .../app/components/koenig-lexical-editor.js | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ghost/admin/app/components/koenig-lexical-editor.js b/ghost/admin/app/components/koenig-lexical-editor.js index 597654e4e7..04134c5db4 100644 --- a/ghost/admin/app/components/koenig-lexical-editor.js +++ b/ghost/admin/app/components/koenig-lexical-editor.js @@ -306,16 +306,18 @@ export default class KoenigLexicalEditor extends Component { return labels.map(label => label.name); }; + const unsplashConfig = { + defaultHeaders: { + Authorization: `Client-ID 8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980`, + 'Accept-Version': 'v1', + 'Content-Type': 'application/json', + 'App-Pragma': 'no-cache', + 'X-Unsplash-Cache': true + } + }; + const defaultCardConfig = { - unsplash: { - defaultHeaders: { - Authorization: `Client-ID 8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980`, - 'Accept-Version': 'v1', - 'Content-Type': 'application/json', - 'App-Pragma': 'no-cache', - 'X-Unsplash-Cache': true - } - }, + unsplash: this.settings.unsplash ? unsplashConfig : null, tenor: this.config.tenor?.googleApiKey ? this.config.tenor : null, fetchEmbed, fetchCollectionPosts,