diff --git a/ghost/admin/app/components/koenig-lexical-editor.js b/ghost/admin/app/components/koenig-lexical-editor.js index d99596a78c..bf5c5bd33a 100644 --- a/ghost/admin/app/components/koenig-lexical-editor.js +++ b/ghost/admin/app/components/koenig-lexical-editor.js @@ -287,14 +287,22 @@ export default class KoenigLexicalEditor extends Component { }; const donationLink = () => { - // TODO: remove feature condition once Tips & Donations have been released - if (this.feature.tipsAndDonations) { - if (this.settings.donationsEnabled) { - return [{ - label: 'Tip or donation', - value: '#/portal/support' - }]; - } + if (this.feature.tipsAndDonations && this.settings.donationsEnabled) { + return [{ + label: 'Tip or donation', + value: '#/portal/support' + }]; + } + + return []; + }; + + const recommendationLink = () => { + if (this.settings.recommendationsEnabled) { + return [{ + label: 'Recommendations', + value: '#/portal/recommendations' + }]; } return []; @@ -307,7 +315,7 @@ export default class KoenigLexicalEditor extends Component { }; }); - return [...defaults, ...memberLinks(), ...donationLink(), ...offersLinks]; + return [...defaults, ...memberLinks(), ...donationLink(), ...recommendationLink(), ...offersLinks]; }; const fetchLabels = async () => { diff --git a/ghost/admin/app/services/settings.js b/ghost/admin/app/services/settings.js index 7c3294dc6d..1c1c5561ba 100644 --- a/ghost/admin/app/services/settings.js +++ b/ghost/admin/app/services/settings.js @@ -55,7 +55,7 @@ export default class SettingsService extends Service.extend(ValidationEngine) { _loadSettings() { if (!this._loadingPromise) { this._loadingPromise = this.store - .queryRecord('setting', {group: 'site,theme,private,members,portal,newsletter,email,amp,labs,slack,unsplash,views,firstpromoter,editor,comments,analytics,announcement,pintura,donations'}) + .queryRecord('setting', {group: 'site,theme,private,members,portal,newsletter,email,amp,labs,slack,unsplash,views,firstpromoter,editor,comments,analytics,announcement,pintura,donations,recommendations'}) .then((settings) => { this._loadingPromise = null; return settings; diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-button.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-button.js index ac9a48e94f..b311655e9a 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-button.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-button.js @@ -73,14 +73,18 @@ export default class KoenigCardButtonComponent extends Component { }]); } - // TODO: remove feature condition once Tips & Donations have been released - if (this.feature.tipsAndDonations) { - if (this.settings.donationsEnabled) { - urls.push({ - name: 'Tip or donation', - url: '#/portal/support' - }); - } + if (this.feature.tipsAndDonations && this.settings.donationsEnabled) { + urls.push({ + name: 'Tip or donation', + url: '#/portal/support' + }); + } + + if (this.settings.recommendationsEnabled) { + urls.push({ + name: 'Recommendations', + url: '#/portal/recommendations' + }); } if (this.offers) { diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-email-cta.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-email-cta.js index 6d787d66f8..f1b486ef55 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-email-cta.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-email-cta.js @@ -97,14 +97,18 @@ export default class KoenigCardEmailCtaComponent extends Component { }]); } - // TODO: remove feature condition once Tips & Donations have been released - if (this.feature.tipsAndDonations) { - if (this.settings.donationsEnabled) { - urls.push({ - name: 'Tip or donation', - url: '#/portal/support' - }); - } + if (this.feature.tipsAndDonations && this.settings.donationsEnabled) { + urls.push({ + name: 'Tip or donation', + url: '#/portal/support' + }); + } + + if (this.settings.recommendationsEnabled) { + urls.push({ + name: 'Recommendations', + url: '#/portal/recommendations' + }); } if (this.offers) { diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.js b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.js index e9ca85466e..3653d30d16 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.js +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.js @@ -86,14 +86,18 @@ export default class KoenigCardHeaderComponent extends Component { }]); } - // TODO: remove feature condition once Tips & Donations have been released - if (this.feature.tipsAndDonations) { - if (this.settings.donationsEnabled) { - urls.push({ - name: 'Tip or donation', - url: '#/portal/support' - }); - } + if (this.feature.tipsAndDonations && this.settings.donationsEnabled) { + urls.push({ + name: 'Tip or donation', + url: '#/portal/support' + }); + } + + if (this.settings.recommendationsEnabled) { + urls.push({ + name: 'Recommendations', + url: '#/portal/recommendations' + }); } if (this.offers) {