2014-03-10 07:44:08 +04:00
|
|
|
import styleBody from 'ghost/mixins/style-body';
|
2014-06-05 07:18:23 +04:00
|
|
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
2014-03-10 07:44:08 +04:00
|
|
|
|
2014-06-05 07:18:23 +04:00
|
|
|
var SignupRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
2014-07-03 19:06:07 +04:00
|
|
|
classNames: ['ghost-signup'],
|
|
|
|
beforeModel: function () {
|
|
|
|
if (this.get('session').isAuthenticated) {
|
|
|
|
this.transitionTo(Ember.SimpleAuth.routeAfterAuthentication);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
setupController: function (controller, params) {
|
|
|
|
var tokenText = atob(params.token),
|
|
|
|
email = tokenText.split('|')[1];
|
|
|
|
controller.token = params.token;
|
|
|
|
controller.email = email;
|
|
|
|
controller.name = email.substring(0, email.indexOf('@'));
|
|
|
|
}
|
2014-03-10 07:44:08 +04:00
|
|
|
});
|
|
|
|
|
|
|
|
export default SignupRoute;
|