mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
Wired up Connect with Stripe button for tips and donations (#17644)
fixes https://github.com/TryGhost/Product/issues/3702
This commit is contained in:
parent
b9fcbc7f28
commit
9e2a1b7d57
3 changed files with 4 additions and 7 deletions
|
@ -15,7 +15,7 @@
|
|||
{{/if}}
|
||||
</div>
|
||||
<div class="gh-expandable-content">
|
||||
{{#liquid-if this.tipsAndDonationsOpen}}
|
||||
{{#liquid-if (and this.tipsAndDonationsOpen this.membersUtils.isStripeEnabled) }}
|
||||
<div class="gh-setting-content-extended">
|
||||
<GhFormGroup>
|
||||
<div class="flex items-center">
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -177,11 +177,11 @@
|
|||
<div class="gh-expandable">
|
||||
<Settings::SignupFormEmbed />
|
||||
{{#if (feature "tipsAndDonations")}}
|
||||
<Settings::TipsAndDonations />
|
||||
<Settings::TipsAndDonations @openStripeConnect={{this.openStripeConnect}}/>
|
||||
{{/if}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
{{#if this.showPortalSettings}}
|
||||
<GhFullscreenModal
|
||||
@modal="portal-settings"
|
||||
|
|
Loading…
Add table
Reference in a new issue