mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
parent
3f75c2857b
commit
495143b027
@ -55,7 +55,7 @@
|
||||
<div class="flex justify-between">
|
||||
<div>
|
||||
<h4 class="gh-setting-title">Connect to Stripe</h4>
|
||||
{{#if this.stripeConnectIntegration}}
|
||||
{{#if this.stripeConnectAccountId}}
|
||||
<p class="gh-setting-desc pa0 ma0">
|
||||
{{#if this.stripeConnectSuccess}}
|
||||
{{svg-jar "check-circle" class="stroke-green w4 h4 nudge-top--3"}} <span class="green-d1">Successfully connected to {{this.stripeConnectAccountName}}</span>
|
||||
@ -77,7 +77,7 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
<div>
|
||||
{{#if this.stripeConnectIntegration}}
|
||||
{{#if this.stripeConnectAccountId}}
|
||||
<button type="button" class="gh-btn" {{action "openDisconnectStripeModal"}}><span>Disconnect</span></button>
|
||||
{{else}}
|
||||
<button type="button" class="gh-btn" {{action (toggle "membersStripeOpen" this)}} data-test-toggle-membersstripe><span>{{if this.membersStripeOpen "Close" "Expand"}}</span></button>
|
||||
|
@ -55,26 +55,9 @@ export default Component.extend({
|
||||
stripeDirectSecretKey: reads('settings.stripeSecretKey'),
|
||||
|
||||
stripeConnectAccountId: reads('settings.stripeConnectAccountId'),
|
||||
stripeConnectAccountName: reads('settings.stripeConnectAccountName'),
|
||||
stripeConnectAccountName: reads('settings.stripeConnectDisplayName'),
|
||||
stripeConnectLivemode: reads('settings.stripeConnectLivemode'),
|
||||
|
||||
stripeConnectIntegration: computed('settings.stripeConnectIntegration', function () {
|
||||
try {
|
||||
const integration = JSON.parse(this.get('settings.stripeConnectIntegration'));
|
||||
if (!integration || !integration.account_id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
id: integration.account_id,
|
||||
name: integration.display_name,
|
||||
livemode: integration.livemode
|
||||
};
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
}),
|
||||
|
||||
selectedCurrency: computed('stripePlans.monthly.currency', function () {
|
||||
return CURRENCIES.findBy('value', this.get('stripePlans.monthly.currency'));
|
||||
}),
|
||||
|
Loading…
Reference in New Issue
Block a user