From 9e2a1b7d57ec43a8426493d1278c485573043889 Mon Sep 17 00:00:00 2001 From: Simon Backx Date: Wed, 9 Aug 2023 10:27:28 +0200 Subject: [PATCH] Wired up Connect with Stripe button for tips and donations (#17644) fixes https://github.com/TryGhost/Product/issues/3702 --- ghost/admin/app/components/settings/tips-and-donations.hbs | 2 +- ghost/admin/app/components/settings/tips-and-donations.js | 5 +---- ghost/admin/app/templates/settings/membership.hbs | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ghost/admin/app/components/settings/tips-and-donations.hbs b/ghost/admin/app/components/settings/tips-and-donations.hbs index 0a668cf951..7ecf08ba21 100644 --- a/ghost/admin/app/components/settings/tips-and-donations.hbs +++ b/ghost/admin/app/components/settings/tips-and-donations.hbs @@ -15,7 +15,7 @@ {{/if}}
- {{#liquid-if this.tipsAndDonationsOpen}} + {{#liquid-if (and this.tipsAndDonationsOpen this.membersUtils.isStripeEnabled) }}
diff --git a/ghost/admin/app/components/settings/tips-and-donations.js b/ghost/admin/app/components/settings/tips-and-donations.js index 310d104593..d3d5979aa0 100644 --- a/ghost/admin/app/components/settings/tips-and-donations.js +++ b/ghost/admin/app/components/settings/tips-and-donations.js @@ -6,7 +6,6 @@ import {currencies} from 'ghost-admin/utils/currency'; import {inject} from 'ghost-admin/decorators/inject'; import {inject as service} from '@ember/service'; import {task, timeout} from 'ember-concurrency'; -import {tracked} from '@glimmer/tracking'; const CURRENCIES = currencies.map((currency) => { return { @@ -21,7 +20,6 @@ export default class TipsAndDonations extends Component { @service membersUtils; @inject config; - @tracked showStripeConnect = false; get allCurrencies() { return CURRENCIES; @@ -66,8 +64,7 @@ export default class TipsAndDonations extends Component { @action openStripeConnect() { - this.stripeEnabledOnOpen = this.membersUtils.isStripeEnabled; - this.showStripeConnect = true; + this.args.openStripeConnect(); } @action diff --git a/ghost/admin/app/templates/settings/membership.hbs b/ghost/admin/app/templates/settings/membership.hbs index 7c069b2629..00f77a36b3 100644 --- a/ghost/admin/app/templates/settings/membership.hbs +++ b/ghost/admin/app/templates/settings/membership.hbs @@ -177,11 +177,11 @@
{{#if (feature "tipsAndDonations")}} - + {{/if}}
- + {{#if this.showPortalSettings}}