Ghost/ghost/admin/app/routes/setup/one.js
Hannah Wolfe 3ad2115b40 First pass at user onboarding screens
refs #5315

- split setup into 3 screens
- add gravatar fetching
- add download counter
- add button handling for invite users
2015-05-25 17:43:12 +01:00

25 lines
654 B
JavaScript

import Ember from 'ember';
import ajax from 'ghost/utils/ajax';
var SetupOneRoute = Ember.Route.extend({
titleToken: 'Setup',
beforeModel: function () {
var self = this,
ctrl = this.controllerFor('setup.one');
if (!ctrl) {
this.generateController('setup.one');
ctrl = this.controllerFor('setup.one');
}
return ajax({
url: self.get('ghostPaths.count'),
type: 'GET'
}).then(function (data) {
ctrl.set('count', data.count.toLocaleString());
}).catch(function () { /* Do nothing */ });
}
});
export default SetupOneRoute;