mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
c9e29d6e9e
closes https://github.com/TryGhost/Team/issues/915 refs https://github.com/TryGhost/Admin/commit/a7bb783d3 - When the disabled email limit is returned we want to have a special header along with the modal copy
35 lines
898 B
JavaScript
35 lines
898 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(),
|
|
|
|
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 migssing 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');
|
|
},
|
|
|
|
confirm() {
|
|
this.send('upgrade');
|
|
}
|
|
}
|
|
});
|