1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/controllers/setup.js
2016-01-19 07:03:27 -06:00

23 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';
})
});