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 ResetRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
2014-03-31 13:57:50 +04:00
|
|
|
classNames: ['ghost-reset'],
|
2014-07-28 20:00:08 +04:00
|
|
|
beforeModel: function () {
|
|
|
|
if (this.get('session').isAuthenticated) {
|
2014-08-06 04:11:52 +04:00
|
|
|
this.notifications.showWarn('You can\'t reset your password while you\'re signed in.', { delayed: true });
|
2014-07-28 20:00:08 +04:00
|
|
|
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
|
|
|
|
}
|
|
|
|
},
|
2014-03-31 13:57:50 +04:00
|
|
|
setupController: function (controller, params) {
|
|
|
|
controller.token = params.token;
|
|
|
|
}
|
2014-03-10 07:44:08 +04:00
|
|
|
});
|
|
|
|
|
|
|
|
export default ResetRoute;
|