diff --git a/ghost/admin/.lint-todo b/ghost/admin/.lint-todo index a7d37d4b78..b24982abc0 100644 --- a/ghost/admin/.lint-todo +++ b/ghost/admin/.lint-todo @@ -585,3 +585,4 @@ remove|ember-template-lint|no-action|369|46|369|46|1d7de8deaee7bfe5bd051e900e988 remove|ember-template-lint|no-action|401|46|401|46|df19e5858021b80de54052c953e70e3b4606a8f5|1688342400000|1698714000000|1703898000000|app/components/gh-portal-links.hbs remove|ember-template-lint|no-action|433|46|433|46|3afa41e4d86dd7e5c049a762f0f761c2464a5f96|1688342400000|1698714000000|1703898000000|app/components/gh-portal-links.hbs remove|ember-template-lint|no-action|465|46|465|46|f2f0f3f512f141fdd821333c873f5052813bb491|1688342400000|1698714000000|1703898000000|app/components/gh-portal-links.hbs +remove|ember-template-lint|no-unused-block-params|1|0|1|0|e25f7866ab4ee682b08edf3b29a1351e4079538e|1688342400000|1698714000000|1703898000000|lib/koenig-editor/addon/components/koenig-card-header.hbs diff --git a/ghost/admin/app/components/koenig-lexical-editor.js b/ghost/admin/app/components/koenig-lexical-editor.js index 750d39c904..192c132335 100644 --- a/ghost/admin/app/components/koenig-lexical-editor.js +++ b/ghost/admin/app/components/koenig-lexical-editor.js @@ -282,7 +282,22 @@ export default class KoenigLexicalEditor extends Component { return links; }; - return [...defaults, ...offersLinks, ...memberLinks()]; + + const donationLink = () => { + // TODO: remove feature condition once Tips & Donations have been released + if (this.feature.tipsAndDonations) { + if (this.settings.donationsEnabled) { + return [{ + label: `Support ${this.settings.title}`, + value: this.config.getSiteUrl('/#/portal/support') + }]; + } + } + + return []; + }; + + return [...defaults, ...offersLinks, ...memberLinks(), ...donationLink()]; }; const fetchLabels = async () => { 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 b96cb8f2ef..34ace7980f 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 @@ -11,6 +11,7 @@ import {tracked} from '@glimmer/tracking'; export default class KoenigCardButtonComponent extends Component { @service feature; @service store; + @service settings; @service membersUtils; @service ui; @@ -81,6 +82,16 @@ 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: `Support ${this.settings.title}`, + url: this.config.getSiteUrl('/#/portal/support') + }); + } + } + return urls; } 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 23758e4dfa..402c7d5ee5 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 @@ -15,6 +15,7 @@ import {tracked} from '@glimmer/tracking'; export default class KoenigCardEmailCtaComponent extends Component { @service feature; @service store; + @service settings; @service membersUtils; @service ui; @@ -105,6 +106,16 @@ 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: `Support ${this.settings.title}`, + url: this.config.getSiteUrl('/#/portal/support') + }); + } + } + return urls; } diff --git a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.hbs b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.hbs index 8e486fd0f1..134bb1c38f 100644 --- a/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.hbs +++ b/ghost/admin/lib/koenig-editor/addon/components/koenig-card-header.hbs @@ -18,7 +18,6 @@ @moveCursorToNextSection={{@moveCursorToNextSection}} @editor={{@editor}} {{did-insert this.registerElement}} - as |card| > {{#if @isEditing}}