mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 11:54:33 +03:00
04d9caefed
no issue
Updated settings navigation to a completely redesigned flow for Ghost 4.0 🎉
Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
Co-authored-by: Fabien O'Carroll <fabien@allou.is>
Co-authored-by: Rish <zrishabhgarg@gmail.com>
26 lines
768 B
JavaScript
26 lines
768 B
JavaScript
import ModalComponent from 'ghost-admin/components/modal-base';
|
|
import {alias} from '@ember/object/computed';
|
|
import {inject as service} from '@ember/service';
|
|
import {task} from 'ember-concurrency';
|
|
|
|
export default ModalComponent.extend({
|
|
router: service(),
|
|
notifications: service(),
|
|
integration: alias('model'),
|
|
actions: {
|
|
confirm() {
|
|
this.deleteIntegration.perform();
|
|
}
|
|
},
|
|
deleteIntegration: task(function* () {
|
|
try {
|
|
yield this.confirm();
|
|
this.router.transitionTo('integrations');
|
|
} catch (error) {
|
|
this.notifications.showAPIError(error, {key: 'integration.delete.failed'});
|
|
} finally {
|
|
this.send('closeModal');
|
|
}
|
|
}).drop()
|
|
});
|