2016-07-06 22:47:30 +03:00
|
|
|
import Controller from 'ember-controller';
|
|
|
|
import computed, {match} from 'ember-computed';
|
|
|
|
import injectController from 'ember-controller/inject';
|
2017-05-29 21:50:03 +03:00
|
|
|
import injectService from 'ember-service/inject';
|
2015-05-26 05:10:50 +03:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
export default Controller.extend({
|
2016-07-06 22:47:30 +03:00
|
|
|
appController: injectController('application'),
|
|
|
|
ghostPaths: injectService(),
|
2014-06-25 16:12:48 +04:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
showBackLink: match('appController.currentRouteName', /^setup\.(two|three)$/),
|
|
|
|
|
|
|
|
backRoute: computed('appController.currentRouteName', function () {
|
2016-07-06 22:47:30 +03:00
|
|
|
let currentRoute = this.get('appController.currentRouteName');
|
2014-06-25 16:12:48 +04:00
|
|
|
|
2015-07-16 17:12:03 +03:00
|
|
|
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
|
|
|
|
})
|
2014-06-25 16:12:48 +04:00
|
|
|
});
|