Ghost/ghost/admin/app/controllers/setup.js
2016-01-19 07:03:27 -06:00

24 lines
619 B
JavaScript

import Ember from 'ember';
const {
Controller,
computed,
get,
inject: {service, controller}
} = Ember;
const {match} = computed;
export default Controller.extend({
appController: controller('application'),
ghostPaths: service(),
showBackLink: match('appController.currentRouteName', /^setup\.(two|three)$/),
backRoute: computed('appController.currentRouteName', function () {
let appController = this.get('appController');
let currentRoute = get(appController, 'currentRouteName');
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
})
});