Ghost/ghost/admin/app/components/modals/delete-user.js
Kevin Ansfield 7886cdcb79 🐛 fix highlighted number of posts when deleting a user (#144)
closes https://github.com/TryGhost/Ghost/issues/7136
- pass user into the modal when displaying
- fix the user->model alias in the modal component
- update mirage user endpoints to respect `?include=count.posts` param
2016-08-24 07:26:29 -06:00

21 lines
458 B
JavaScript

import ModalComponent from 'ghost-admin/components/modals/base';
import {invokeAction} from 'ember-invoke-action';
import {alias} from 'ember-computed';
export default ModalComponent.extend({
submitting: false,
user: alias('model'),
actions: {
confirm() {
this.set('submitting', true);
invokeAction(this, 'confirm').finally(() => {
this.send('closeModal');
});
}
}
});