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:
commit
023820eddd
4 changed files with 12 additions and 11 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue