2022-02-01 12:34:03 +03:00
|
|
|
import classic from 'ember-classic-decorator';
|
2017-08-22 10:53:26 +03:00
|
|
|
import {computed} from '@ember/object';
|
|
|
|
import {match} from '@ember/object/computed';
|
2017-10-30 12:38:01 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2022-02-01 12:34:03 +03:00
|
|
|
/* eslint-disable ghost/ember/alias-model-in-controller */
|
|
|
|
import Controller from '@ember/controller';
|
|
|
|
|
|
|
|
@classic
|
|
|
|
export default class SetupController extends Controller {
|
2022-02-01 20:03:45 +03:00
|
|
|
@service ghostPaths;
|
|
|
|
@service router;
|
2014-06-25 16:12:48 +04:00
|
|
|
|
2022-02-01 12:34:03 +03:00
|
|
|
@match('router.currentRouteName', /^setup\.(two|three)$/)
|
2022-02-10 13:41:36 +03:00
|
|
|
showBackLink;
|
2015-10-28 14:36:45 +03:00
|
|
|
|
2022-02-01 12:34:03 +03:00
|
|
|
@computed('router.currentRouteName')
|
|
|
|
get backRoute() {
|
2019-05-06 16:51:23 +03:00
|
|
|
let currentRoute = this.router.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';
|
2022-02-01 12:34:03 +03:00
|
|
|
}
|
|
|
|
}
|