mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
bfe542b27d
refs #101, #95 - shim controllers that were missed initially
18 lines
631 B
JavaScript
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';
|
|
})
|
|
});
|