mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
b3112a4349
no issue - added redirect and notification to reset route - added notification to signup route
21 lines
750 B
JavaScript
21 lines
750 B
JavaScript
import styleBody from 'ghost/mixins/style-body';
|
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
|
|
|
var SignupRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
|
classNames: ['ghost-signup'],
|
|
beforeModel: function () {
|
|
if (this.get('session').isAuthenticated) {
|
|
this.notifications.showWarn('You need to sign out to register as a new user.', true);
|
|
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
|
|
}
|
|
},
|
|
setupController: function (controller, params) {
|
|
var tokenText = atob(params.token),
|
|
email = tokenText.split('|')[1];
|
|
controller.token = params.token;
|
|
controller.email = email;
|
|
}
|
|
});
|
|
|
|
export default SignupRoute;
|