mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
22 lines
466 B
JavaScript
22 lines
466 B
JavaScript
|
import ModalComponent from 'ghost-admin/components/modal-base';
|
||
|
import {task} from 'ember-concurrency';
|
||
|
|
||
|
export default ModalComponent.extend({
|
||
|
// Allowed actions
|
||
|
confirm: () => {},
|
||
|
|
||
|
actions: {
|
||
|
confirm() {
|
||
|
this.deleteMembersTask.perform();
|
||
|
}
|
||
|
},
|
||
|
|
||
|
deleteMembersTask: task(function* () {
|
||
|
try {
|
||
|
yield this.confirm();
|
||
|
} finally {
|
||
|
this.send('closeModal');
|
||
|
}
|
||
|
}).drop()
|
||
|
});
|