travis-web/app/routes/auth.js
2016-01-12 16:55:22 +01:00

28 lines
480 B
JavaScript

import TravisRoute from 'travis/routes/basic';
export default TravisRoute.extend({
needsAuth: false,
renderTemplate() {
$('body').attr('id', 'auth');
return this.render('signin');
},
deactivate() {
return this.controllerFor('auth').set('redirected', false);
},
actions: {
afterSignIn() {
this.transitionTo('main');
return true;
}
},
redirect() {
if (this.signedIn()) {
return this.transitionTo('main');
}
}
});