0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Merged v4.8.1 into main

v4.8.1
This commit is contained in:
Daniel Lockyer 2021-06-24 11:20:17 +01:00
commit 023820eddd
4 changed files with 12 additions and 11 deletions

View file

@ -1,7 +1,7 @@
<header class="modal-header" data-test-modal="webhook-form" {{will-destroy this.reset}}>
<h1 data-test-text="title">Connect with Stripe</h1>
</header>
<button class="close" href title="Close" {{action "confirm"}} {{action (optional this.noop) on="mouseDown"}}>
<button class="close" href title="Close" {{action "closeModal"}} {{action (optional this.noop) on="mouseDown"}}>
{{svg-jar "close"}}
</button>
@ -26,4 +26,4 @@
<span>OK</span>
</button>
{{/if}}
</div>
</div>

View file

@ -51,6 +51,10 @@ export default class ModalStripeConnect extends ModalBase {
return this.confirmAction();
}
// noop - enter key shouldn't do anything
},
// needed because ModalBase uses .send() for keyboard events
closeModal() {
this.close();
}
}
}

View file

@ -53,12 +53,15 @@ export default class DashboardController extends Controller {
this.loadWhatsNew();
}
loadMRRStats() {
async loadMRRStats() {
const products = await this.store.query('product', {include: 'monthly_price,yearly_price', limit: 'all'});
const defaultProduct = products?.firstObject;
this.mrrStatsLoading = true;
this.membersStats.fetchMRR().then((stats) => {
this.mrrStatsLoading = false;
const statsData = stats.data || [];
const defaultCurrency = this.getDefaultCurrency() || 'usd';
const defaultCurrency = defaultProduct?.monthlyPrice?.currency || 'usd';
let currencyStats = statsData.find((stat) => {
return stat.currency === defaultCurrency;
});
@ -230,12 +233,6 @@ export default class DashboardController extends Controller {
});
}
getDefaultCurrency() {
const plans = this.settings.get('stripePlans') || [];
const monthly = plans.find(plan => plan.interval === 'month');
return monthly && monthly.currency;
}
@action
dismissLaunchBanner() {
this.feature.set('launchComplete', true);

View file

@ -1,6 +1,6 @@
{
"name": "ghost-admin",
"version": "4.8.0",
"version": "4.8.1",
"description": "Ember.js admin client for Ghost",
"author": "Ghost Foundation",
"homepage": "http://ghost.org",