Drop nprogress

This commit is contained in:
Matthew Dillon 2015-06-08 14:12:36 -08:00
parent 1d8bda846d
commit cf44f33f39
7 changed files with 17 additions and 30 deletions

View file

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

View file

@ -8,8 +8,6 @@ var app = new EmberApp();
// flakes (and deps)
app.import('bower_components/flakes/css/all.css');
app.import('bower_components/gridforms/gridforms/gridforms.css');
// nprogress
app.import('bower_components/nprogress/nprogress.css');
// LIBS ////////////////////////////////////////////////////////////////////////
// flakes (and deps)
@ -17,8 +15,6 @@ app.import('bower_components/snapjs/snap.js');
app.import('bower_components/responsive-elements/responsive-elements.js');
app.import('bower_components/gridforms/gridforms/gridforms.js');
app.import('bower_components/flakes/js/base.js');
// nprogress
app.import('bower_components/nprogress/nprogress.js');
// moment
app.import('bower_components/moment/moment.js');

View file

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

View file

@ -0,0 +1,4 @@
<div class="spinner">
<div class="double-bounce1"></div>
<div class="double-bounce2"></div>
</div>

View file

@ -14,7 +14,6 @@
"qunit": "~1.17.1",
"flakes": "~1.0.0",
"ember-simple-auth": "~0.8.0-beta.3",
"nprogress": "~0.1.6",
"moment": "~2.9.0"
}
}

View file

@ -38,11 +38,6 @@ module.exports = function(environment) {
tokenPropertyName: 'token',
authorizationPrefix: 'Bearer ',
authorizationHeaderName: 'Authorization',
refreshAccessTokens: true,
serverTokenRefreshEndpoint: '/api/authenticate',
tokenExpireName: 'exp',
refreshLeeway: 300,
timeFactor: 1
}
ENV.apiURL = 'http://127.0.0.1:4200';
ENV.contentSecurityPolicy = {
@ -69,11 +64,6 @@ module.exports = function(environment) {
tokenPropertyName: 'token',
authorizationPrefix: 'Bearer ',
authorizationHeaderName: 'Authorization',
refreshAccessTokens: true,
serverTokenRefreshEndpoint: 'https://bactdb-test.herokuapp.com/api/authenticate',
tokenExpireName: 'exp',
refreshLeeway: 300,
timeFactor: 1
}
ENV.apiURL = 'https://bactdb-test.herokuapp.com';
ENV.contentSecurityPolicy = {
@ -104,11 +94,6 @@ module.exports = function(environment) {
tokenPropertyName: 'token',
authorizationPrefix: 'Bearer ',
authorizationHeaderName: 'Authorization',
refreshAccessTokens: true,
serverTokenRefreshEndpoint: 'https://bactdb.herokuapp.com/api/authenticate',
tokenExpireName: 'exp',
refreshLeeway: 300,
timeFactor: 1
}
ENV.apiURL = 'https://bactdb.herokuapp.com';
ENV.contentSecurityPolicy = {

View file

@ -0,0 +1,11 @@
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:loading', 'Unit | Route | loading', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
test('it exists', function(assert) {
var route = this.subject();
assert.ok(route);
});