Hid Stripe apikey form if stripeDirect: false

no-issue

We are going to keep the UI as a fallback in future. Eventually this
`if` will include an `else` block rendering a Stripe Connect button.
This commit is contained in:
Fabien O'Carroll 2020-05-20 16:24:43 +02:00 committed by Fabien 'egg' O'Carroll
parent 055674af77
commit c899af36b4
2 changed files with 48 additions and 44 deletions

View File

@ -1,6 +1,7 @@
<div class="flex flex-column b--whitegrey bt"> <div class="flex flex-column b--whitegrey bt">
<section class="bb b--whitegrey pa5"> <section class="bb b--whitegrey pa5">
{{#if this.stripeDirect}}
<div class="flex justify-between"> <div class="flex justify-between">
<div> <div>
<h4 class="gh-setting-title">Connect to Stripe</h4> <h4 class="gh-setting-title">Connect to Stripe</h4>
@ -50,6 +51,7 @@
</div> </div>
</div> </div>
{{/liquid-if}} {{/liquid-if}}
{{/if}}
</section> </section>
<section class="bb b--whitegrey pa5"> <section class="bb b--whitegrey pa5">

View File

@ -37,6 +37,8 @@ export default Component.extend({
defaultContentVisibility: reads('settings.defaultContentVisibility'), defaultContentVisibility: reads('settings.defaultContentVisibility'),
stripeDirect: reads('config.stripeDirect'),
selectedCurrency: computed('subscriptionSettings.stripeConfig.plans.monthly.currency', function () { selectedCurrency: computed('subscriptionSettings.stripeConfig.plans.monthly.currency', function () {
return CURRENCIES.findBy('value', this.get('subscriptionSettings.stripeConfig.plans.monthly.currency')); return CURRENCIES.findBy('value', this.get('subscriptionSettings.stripeConfig.plans.monthly.currency'));
}), }),