diff --git a/ghost/admin/app/components/gh-fullscreen-modal.hbs b/ghost/admin/app/components/gh-fullscreen-modal.hbs index 56f6d17115..fe9b246576 100644 --- a/ghost/admin/app/components/gh-fullscreen-modal.hbs +++ b/ghost/admin/app/components/gh-fullscreen-modal.hbs @@ -9,6 +9,8 @@ @model={{this.model}} @confirm={{action "confirm"}} @closeModal={{action "close"}} + @modifier={{this.modifier}} + @updateModifier={{action (mut this.modifier)}} /> {{/let}} {{/if}} diff --git a/ghost/admin/app/components/gh-members-payments-setting.js b/ghost/admin/app/components/gh-members-payments-setting.js index cddc650b2f..e7ce1c8820 100644 --- a/ghost/admin/app/components/gh-members-payments-setting.js +++ b/ghost/admin/app/components/gh-members-payments-setting.js @@ -226,6 +226,8 @@ export default Component.extend({ yield this.ajax.delete(url); yield this.settings.reload(); + + this.onDisconnected?.(); }), calculateDiscount(monthly, yearly) { @@ -262,8 +264,10 @@ export default Component.extend({ if (this.get('settings.stripeConnectIntegrationToken')) { try { let response = yield this.settings.save(); + const products = yield this.store.query('product', {include: 'stripe_prices'}); this.product = products.firstObject; + if (this.product) { const stripePrices = this.product.stripePrices || []; const yearlyDiscount = this.calculateDiscount(5, 50); @@ -297,8 +301,11 @@ export default Component.extend({ this.settings.set('membersYearlyPriceId', yearlyPrice.id); response = yield this.settings.save(); } + this.set('membersStripeOpen', false); this.set('stripeConnectSuccess', true); + this.onConnected?.(); + return response; } catch (error) { if (error.payload && error.payload.errors) { diff --git a/ghost/admin/app/components/modal-stripe-connect.hbs b/ghost/admin/app/components/modal-stripe-connect.hbs index f7900792e0..eaa3816469 100644 --- a/ghost/admin/app/components/modal-stripe-connect.hbs +++ b/ghost/admin/app/components/modal-stripe-connect.hbs @@ -8,9 +8,11 @@