mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
24 lines
619 B
JavaScript
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';
|
|
})
|
|
});
|