mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
ad98a9a072
refs https://github.com/TryGhost/Ghost/issues/7865 - updates all settings screens to use EC tasks and `gh-task-button` to get save-state save buttons - removes now-unused `settings-save` mixin - moves the order of button color CSS so that grey buttons can change to green/red after completing - removes the heading from `apps-loading` template so that there's no odd flash when loading slack/amp screens directly
19 lines
506 B
JavaScript
19 lines
506 B
JavaScript
import Controller from 'ember-controller';
|
|
import injectService from 'ember-service/inject';
|
|
import {task} from 'ember-concurrency';
|
|
|
|
export default Controller.extend({
|
|
notifications: injectService(),
|
|
|
|
save: task(function* () {
|
|
let notifications = this.get('notifications');
|
|
|
|
try {
|
|
return yield this.get('model').save();
|
|
} catch (error) {
|
|
notifications.showAPIError(error, {key: 'code-injection.save'});
|
|
throw error;
|
|
}
|
|
})
|
|
});
|