mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
f07940f0e7
no issue - find+replace to make service injection style consistent and take up much less space at the top of files that used multi-line syntax
23 lines
684 B
JavaScript
23 lines
684 B
JavaScript
import classic from 'ember-classic-decorator';
|
|
import {computed} from '@ember/object';
|
|
import {match} from '@ember/object/computed';
|
|
import {inject as service} from '@ember/service';
|
|
/* eslint-disable ghost/ember/alias-model-in-controller */
|
|
import Controller from '@ember/controller';
|
|
|
|
@classic
|
|
export default class SetupController extends Controller {
|
|
@service ghostPaths;
|
|
@service router;
|
|
|
|
@match('router.currentRouteName', /^setup\.(two|three)$/)
|
|
showBackLink;
|
|
|
|
@computed('router.currentRouteName')
|
|
get backRoute() {
|
|
let currentRoute = this.router.currentRouteName;
|
|
|
|
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
|
|
}
|
|
}
|