mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
24 lines
544 B
JavaScript
24 lines
544 B
JavaScript
import ModalComponent from 'ghost-admin/components/modals/base';
|
|
import {invokeAction} from 'ember-invoke-action';
|
|
import {alias} from 'ember-computed';
|
|
import {task} from 'ember-concurrency';
|
|
|
|
export default ModalComponent.extend({
|
|
|
|
user: alias('model'),
|
|
|
|
deleteUser: task(function* () {
|
|
try {
|
|
yield invokeAction(this, 'confirm');
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop(),
|
|
|
|
actions: {
|
|
confirm() {
|
|
this.get('deleteUser').perform();
|
|
}
|
|
}
|
|
});
|