Refs #1: Simple initial take at progress bar.

This commit is contained in:
Matthew Dillon 2015-02-26 20:46:56 -09:00
parent dfba0f2138
commit ab2866df5b
4 changed files with 20 additions and 3 deletions

View file

@ -2,7 +2,8 @@
"predef": [
"document",
"window",
"-Promise"
"-Promise",
"/* global nprogress */"
],
"browser": true,
"boss": true,

View file

@ -5,5 +5,7 @@ var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();
app.import('bower_components/flakes/css/all.css');
app.import('bower_components/nprogress/nprogress.css');
app.import('bower_components/nprogress/nprogress.js');
module.exports = app.toTree();

View file

@ -1,4 +1,17 @@
import Ember from 'ember';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
/* global NProgress */
export default Ember.Route.extend(ApplicationRouteMixin);
export default Ember.Route.extend(ApplicationRouteMixin, {
actions: {
loading: function() {
NProgress.start();
this.router.one('didTransition', function() {
return setTimeout((function() {
return NProgress.done();
}), 50);
});
return true;
}
}
});

View file

@ -14,6 +14,7 @@
"ember-qunit-notifications": "0.0.5",
"qunit": "~1.17.1",
"flakes": "~1.0.0",
"ember-simple-auth": "~0.7.2"
"ember-simple-auth": "~0.7.2",
"nprogress": "~0.1.6"
}
}