mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 18:31:57 +03:00
f8ccb81dfc
no issue - replaced access of `controller.{currentPath,currentRouteName}` with `router.currentRouteName` - https://deprecations.emberjs.com/v3.x/#toc_application-controller-router-properties
19 lines
610 B
JavaScript
19 lines
610 B
JavaScript
/* eslint-disable ghost/ember/alias-model-in-controller */
|
|
import Controller from '@ember/controller';
|
|
import {computed} from '@ember/object';
|
|
import {match} from '@ember/object/computed';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default Controller.extend({
|
|
ghostPaths: service(),
|
|
router: service(),
|
|
|
|
showBackLink: match('router.currentRouteName', /^setup\.(two|three)$/),
|
|
|
|
backRoute: computed('router.currentRouteName', function () {
|
|
let currentRoute = this.router.currentRouteName;
|
|
|
|
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
|
|
})
|
|
});
|