mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
fda94fedab
no issue - https://github.com/ember-cli/eslint-plugin-ember/blob/HEAD/docs/rules/alias-model-in-controller.md - replace `model` with a meaningful property name everywhere possible - refactor `design` and `general` settings controllers to use a directly injected settings service rather than passing it in as a "model" to be more explicit
19 lines
685 B
JavaScript
19 lines
685 B
JavaScript
/* eslint-disable ghost/ember/alias-model-in-controller */
|
|
import Controller, {inject as controller} from '@ember/controller';
|
|
import {computed} from '@ember/object';
|
|
import {match} from '@ember/object/computed';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default Controller.extend({
|
|
appController: controller('application'),
|
|
ghostPaths: service(),
|
|
|
|
showBackLink: match('appController.currentRouteName', /^setup\.(two|three)$/),
|
|
|
|
backRoute: computed('appController.currentRouteName', function () {
|
|
let currentRoute = this.get('appController.currentRouteName');
|
|
|
|
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
|
|
})
|
|
});
|