mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
22 lines
509 B
JavaScript
22 lines
509 B
JavaScript
import ModalComponent from 'ghost-admin/components/modals/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();
|
|
}
|
|
}
|
|
});
|