mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
3ec373e33f
no issue - Overdue subscriptions: when a subscription is in overdue state, we'd like to inform the customers so that the owner is aware and can take action - Exceeded limits: - Show a warning when the members limit is exceeded so users are aware before trying to publish a post and hitting the limit - Allow to redirect directly to a child route in the Ghost(Pro) app, so plan updates get easier
36 lines
958 B
JavaScript
36 lines
958 B
JavaScript
import ModalComponent from 'ghost-admin/components/modal-base';
|
|
import {computed} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default ModalComponent.extend({
|
|
router: service(),
|
|
billing: service(),
|
|
|
|
headerMessage: computed('details', function () {
|
|
let header = 'Upgrade to enable publishing';
|
|
|
|
if (this.model.message && this.model.message.match(/account is currently in review/gi)) {
|
|
header = `Hold up, we're missing some details`;
|
|
}
|
|
|
|
return header;
|
|
}),
|
|
|
|
upgradeMessage: computed('details', function () {
|
|
const {limit, total} = this.model.details || {};
|
|
const message = this.model.message;
|
|
|
|
return {limit, total, message};
|
|
}),
|
|
|
|
actions: {
|
|
upgrade() {
|
|
this.router.transitionTo('pro', {queryParams: {action: 'checkout'}});
|
|
},
|
|
|
|
confirm() {
|
|
this.send('upgrade');
|
|
}
|
|
}
|
|
});
|