mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
064a22e7d2
refs #5315 - split setup into 3 screens - add gravatar fetching - add download counter - add button handling for invite users
27 lines
693 B
JavaScript
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;
|