mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 08:54:36 +03:00
48e3bf003d
no issue - https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-components.md - https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-controllers.md - https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/order-in-routes.md
22 lines
508 B
JavaScript
22 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,
|
|
|
|
actions: {
|
|
confirm() {
|
|
this.get('transferOwnership').perform();
|
|
}
|
|
},
|
|
|
|
transferOwnership: task(function* () {
|
|
try {
|
|
yield invokeAction(this, 'confirm');
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop()
|
|
});
|