Ghost/ghost/admin/app/controllers/setup.js
Austin Burdine bfe542b27d more shimming of controllers (#110)
refs #101, #95
- shim controllers that were missed initially
2016-07-06 20:47:30 +01:00

18 lines
631 B
JavaScript

import Controller from 'ember-controller';
import computed, {match} from 'ember-computed';
import injectService from 'ember-service/inject';
import injectController from 'ember-controller/inject';
export default Controller.extend({
appController: injectController('application'),
ghostPaths: injectService(),
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';
})
});