0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/app/controllers/setup/one.js
Hannah Wolfe 064a22e7d2 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

27 lines
693 B
JavaScript

import Ember from 'ember';
import ajax from 'ghost/utils/ajax';
var SetupOneController = Ember.Controller.extend({
count: 'many, many',
downloadCounter: function () {
var self = this,
interval = 3000;
Ember.run.later(this, function () {
ajax({
url: self.get('ghostPaths.count'),
type: 'GET'
}).then(function (data) {
self.set('count', data.count.toLocaleString());
}).catch(function () {
self.set('count', 'many, many');
});
this.downloadCounter();
}, interval);
}.on('init')
});
export default SetupOneController;