mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
a1f7f6b845
no issue - the upcoming Module Unification re-organisation in Ember will no longer support nested components - this PR pre-emptively moves our usage of nested components into a flat file structure
21 lines
508 B
JavaScript
21 lines
508 B
JavaScript
import ModalComponent from 'ghost-admin/components/modal-base';
|
|
import {invokeAction} from 'ember-invoke-action';
|
|
import {task} from 'ember-concurrency';
|
|
|
|
export default ModalComponent.extend({
|
|
user: null,
|
|
|
|
transferOwnership: task(function* () {
|
|
try {
|
|
yield invokeAction(this, 'confirm');
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop(),
|
|
|
|
actions: {
|
|
confirm() {
|
|
this.get('transferOwnership').perform();
|
|
}
|
|
}
|
|
});
|