Ghost/ghost/admin/app/components/modal-delete-theme.js
Austin Burdine ad5528b078 Remove ember-invoke-action (#978)
closes TryGhost/Ghost#9477
- remove ember-invoke-action in favor of straight function calls
2018-03-20 14:57:59 +00:00

26 lines
580 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: () => {},
theme: alias('model.theme'),
download: alias('model.download'),
actions: {
confirm() {
this.get('deleteTheme').perform();
}
},
deleteTheme: task(function* () {
try {
yield this.confirm();
} finally {
this.send('closeModal');
}
}).drop()
});