1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/components/modal-delete-theme.js

26 lines
573 B
JavaScript
Raw Normal View History

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.deleteTheme.perform();
}
},
deleteTheme: task(function* () {
try {
yield this.confirm();
} finally {
this.send('closeModal');
}
}).drop()
});