25 lines
538 B
JavaScript
25 lines
538 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() {
|
|
return this.unsuspendUser.perform();
|
|
}
|
|
},
|
|
|
|
unsuspendUser: task(function* () {
|
|
try {
|
|
yield this.confirm();
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop()
|
|
});
|