Drop nprogress
This commit is contained in:
		
							parent
							
								
									1d8bda846d
								
							
						
					
					
						commit
						cf44f33f39
					
				
					 7 changed files with 17 additions and 30 deletions
				
			
		| 
						 | 
					@ -2,8 +2,7 @@
 | 
				
			||||||
  "predef": [
 | 
					  "predef": [
 | 
				
			||||||
    "document",
 | 
					    "document",
 | 
				
			||||||
    "window",
 | 
					    "window",
 | 
				
			||||||
    "-Promise",
 | 
					    "-Promise"
 | 
				
			||||||
    "/* global nprogress */"
 | 
					 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "browser": true,
 | 
					  "browser": true,
 | 
				
			||||||
  "boss": true,
 | 
					  "boss": true,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,8 +8,6 @@ var app = new EmberApp();
 | 
				
			||||||
// flakes (and deps)
 | 
					// flakes (and deps)
 | 
				
			||||||
app.import('bower_components/flakes/css/all.css');
 | 
					app.import('bower_components/flakes/css/all.css');
 | 
				
			||||||
app.import('bower_components/gridforms/gridforms/gridforms.css');
 | 
					app.import('bower_components/gridforms/gridforms/gridforms.css');
 | 
				
			||||||
// nprogress
 | 
					 | 
				
			||||||
app.import('bower_components/nprogress/nprogress.css');
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
// LIBS ////////////////////////////////////////////////////////////////////////
 | 
					// LIBS ////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
// flakes (and deps)
 | 
					// 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/responsive-elements/responsive-elements.js');
 | 
				
			||||||
app.import('bower_components/gridforms/gridforms/gridforms.js');
 | 
					app.import('bower_components/gridforms/gridforms/gridforms.js');
 | 
				
			||||||
app.import('bower_components/flakes/js/base.js');
 | 
					app.import('bower_components/flakes/js/base.js');
 | 
				
			||||||
// nprogress
 | 
					 | 
				
			||||||
app.import('bower_components/nprogress/nprogress.js');
 | 
					 | 
				
			||||||
// moment
 | 
					// moment
 | 
				
			||||||
app.import('bower_components/moment/moment.js');
 | 
					app.import('bower_components/moment/moment.js');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,5 @@
 | 
				
			||||||
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: {
 | 
					  actions: {
 | 
				
			||||||
| 
						 | 
					@ -8,13 +7,7 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
 | 
				
			||||||
      this.get('session').invalidate();
 | 
					      this.get('session').invalidate();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    loading: function() {
 | 
					    loading: function() {
 | 
				
			||||||
      NProgress.start();
 | 
					 | 
				
			||||||
      this.router.one('didTransition', function() {
 | 
					 | 
				
			||||||
        return setTimeout((function() {
 | 
					 | 
				
			||||||
          return NProgress.done();
 | 
					 | 
				
			||||||
        }), 50);
 | 
					 | 
				
			||||||
      });
 | 
					 | 
				
			||||||
      return true;
 | 
					      return true;
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								app/pods/loading/template.hbs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								app/pods/loading/template.hbs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,4 @@
 | 
				
			||||||
 | 
					<div class="spinner">
 | 
				
			||||||
 | 
					  <div class="double-bounce1"></div>
 | 
				
			||||||
 | 
					  <div class="double-bounce2"></div>
 | 
				
			||||||
 | 
					</div>
 | 
				
			||||||
| 
						 | 
					@ -14,7 +14,6 @@
 | 
				
			||||||
    "qunit": "~1.17.1",
 | 
					    "qunit": "~1.17.1",
 | 
				
			||||||
    "flakes": "~1.0.0",
 | 
					    "flakes": "~1.0.0",
 | 
				
			||||||
    "ember-simple-auth": "~0.8.0-beta.3",
 | 
					    "ember-simple-auth": "~0.8.0-beta.3",
 | 
				
			||||||
    "nprogress": "~0.1.6",
 | 
					 | 
				
			||||||
    "moment": "~2.9.0"
 | 
					    "moment": "~2.9.0"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,11 +38,6 @@ module.exports = function(environment) {
 | 
				
			||||||
      tokenPropertyName: 'token',
 | 
					      tokenPropertyName: 'token',
 | 
				
			||||||
      authorizationPrefix: 'Bearer ',
 | 
					      authorizationPrefix: 'Bearer ',
 | 
				
			||||||
      authorizationHeaderName: 'Authorization',
 | 
					      authorizationHeaderName: 'Authorization',
 | 
				
			||||||
      refreshAccessTokens: true,
 | 
					 | 
				
			||||||
      serverTokenRefreshEndpoint: '/api/authenticate',
 | 
					 | 
				
			||||||
      tokenExpireName: 'exp',
 | 
					 | 
				
			||||||
      refreshLeeway: 300,
 | 
					 | 
				
			||||||
      timeFactor: 1
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    ENV.apiURL = 'http://127.0.0.1:4200';
 | 
					    ENV.apiURL = 'http://127.0.0.1:4200';
 | 
				
			||||||
    ENV.contentSecurityPolicy = {
 | 
					    ENV.contentSecurityPolicy = {
 | 
				
			||||||
| 
						 | 
					@ -69,11 +64,6 @@ module.exports = function(environment) {
 | 
				
			||||||
      tokenPropertyName: 'token',
 | 
					      tokenPropertyName: 'token',
 | 
				
			||||||
      authorizationPrefix: 'Bearer ',
 | 
					      authorizationPrefix: 'Bearer ',
 | 
				
			||||||
      authorizationHeaderName: 'Authorization',
 | 
					      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.apiURL = 'https://bactdb-test.herokuapp.com';
 | 
				
			||||||
    ENV.contentSecurityPolicy = {
 | 
					    ENV.contentSecurityPolicy = {
 | 
				
			||||||
| 
						 | 
					@ -104,11 +94,6 @@ module.exports = function(environment) {
 | 
				
			||||||
      tokenPropertyName: 'token',
 | 
					      tokenPropertyName: 'token',
 | 
				
			||||||
      authorizationPrefix: 'Bearer ',
 | 
					      authorizationPrefix: 'Bearer ',
 | 
				
			||||||
      authorizationHeaderName: 'Authorization',
 | 
					      authorizationHeaderName: 'Authorization',
 | 
				
			||||||
      refreshAccessTokens: true,
 | 
					 | 
				
			||||||
      serverTokenRefreshEndpoint: 'https://bactdb.herokuapp.com/api/authenticate',
 | 
					 | 
				
			||||||
      tokenExpireName: 'exp',
 | 
					 | 
				
			||||||
      refreshLeeway: 300,
 | 
					 | 
				
			||||||
      timeFactor: 1
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    ENV.apiURL = 'https://bactdb.herokuapp.com';
 | 
					    ENV.apiURL = 'https://bactdb.herokuapp.com';
 | 
				
			||||||
    ENV.contentSecurityPolicy = {
 | 
					    ENV.contentSecurityPolicy = {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										11
									
								
								tests/unit/pods/loading/route-test.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								tests/unit/pods/loading/route-test.js
									
										
									
									
									
										Normal 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);
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
		Reference in a new issue