0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-04 02:01:58 -05:00

🐛 Fixed Unsplash integration toggle in Koenig editor ()

no issue

- since Unsplash can be toggled on / off in integrations, we need to
pass that to the Koenig-Lexical editor as well.
This commit is contained in:
Ronald Langeveld 2023-08-15 14:59:26 +02:00 committed by GitHub
parent 50c36a4c17
commit a7530720b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -306,8 +306,7 @@ export default class KoenigLexicalEditor extends Component {
return labels.map(label => label.name); return labels.map(label => label.name);
}; };
const defaultCardConfig = { const unsplashConfig = {
unsplash: {
defaultHeaders: { defaultHeaders: {
Authorization: `Client-ID 8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980`, Authorization: `Client-ID 8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980`,
'Accept-Version': 'v1', 'Accept-Version': 'v1',
@ -315,7 +314,10 @@ export default class KoenigLexicalEditor extends Component {
'App-Pragma': 'no-cache', 'App-Pragma': 'no-cache',
'X-Unsplash-Cache': true 'X-Unsplash-Cache': true
} }
}, };
const defaultCardConfig = {
unsplash: this.settings.unsplash ? unsplashConfig : null,
tenor: this.config.tenor?.googleApiKey ? this.config.tenor : null, tenor: this.config.tenor?.googleApiKey ? this.config.tenor : null,
fetchEmbed, fetchEmbed,
fetchCollectionPosts, fetchCollectionPosts,