mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
7d9e0f154a
closes #5317 - Adds back button to steps 2 and 3 - Prevents user navigating from step 1 to step 3 unless blog has been created - Prevents user navigating from step 2 to step 3 unless blog has been created
16 lines
572 B
JavaScript
16 lines
572 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Controller.extend({
|
|
appController: Ember.inject.controller('application'),
|
|
ghostPaths: Ember.inject.service('ghost-paths'),
|
|
|
|
showBackLink: Ember.computed.match('appController.currentRouteName', /^setup\.(two|three)$/),
|
|
|
|
backRoute: Ember.computed('appController.currentRouteName', function () {
|
|
var appController = this.get('appController'),
|
|
currentRoute = Ember.get(appController, 'currentRouteName');
|
|
|
|
return currentRoute === 'setup.two' ? 'setup.one' : 'setup.two';
|
|
})
|
|
});
|