Refs #1: Simple initial take at progress bar.
This commit is contained in:
parent
dfba0f2138
commit
ab2866df5b
4 changed files with 20 additions and 3 deletions
|
@ -2,7 +2,8 @@
|
||||||
"predef": [
|
"predef": [
|
||||||
"document",
|
"document",
|
||||||
"window",
|
"window",
|
||||||
"-Promise"
|
"-Promise",
|
||||||
|
"/* global nprogress */"
|
||||||
],
|
],
|
||||||
"browser": true,
|
"browser": true,
|
||||||
"boss": true,
|
"boss": true,
|
||||||
|
|
|
@ -5,5 +5,7 @@ var EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||||
var app = new EmberApp();
|
var app = new EmberApp();
|
||||||
|
|
||||||
app.import('bower_components/flakes/css/all.css');
|
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();
|
module.exports = app.toTree();
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
import Ember from 'ember';
|
import Ember from 'ember';
|
||||||
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
"ember-qunit-notifications": "0.0.5",
|
"ember-qunit-notifications": "0.0.5",
|
||||||
"qunit": "~1.17.1",
|
"qunit": "~1.17.1",
|
||||||
"flakes": "~1.0.0",
|
"flakes": "~1.0.0",
|
||||||
"ember-simple-auth": "~0.7.2"
|
"ember-simple-auth": "~0.7.2",
|
||||||
|
"nprogress": "~0.1.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue