mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
ad5528b078
closes TryGhost/Ghost#9477 - remove ember-invoke-action in favor of straight function calls
25 lines
532 B
JavaScript
25 lines
532 B
JavaScript
import ModalComponent from 'ghost-admin/components/modal-base';
|
|
import {alias} from '@ember/object/computed';
|
|
import {task} from 'ember-concurrency';
|
|
|
|
export default ModalComponent.extend({
|
|
// Allowed actions
|
|
confirm: () => {},
|
|
|
|
user: alias('model'),
|
|
|
|
actions: {
|
|
confirm() {
|
|
this.get('deleteUser').perform();
|
|
}
|
|
},
|
|
|
|
deleteUser: task(function* () {
|
|
try {
|
|
yield this.confirm();
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop()
|
|
});
|