2014-10-28 17:29:42 +03:00
|
|
|
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
2014-06-01 23:30:50 +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-06-01 23:30:50 +04:00
|
|
|
|
2014-10-28 17:29:42 +03:00
|
|
|
var SignoutRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, {
|
2014-11-25 23:56:08 +03:00
|
|
|
titleToken: 'Sign Out',
|
|
|
|
|
2014-06-01 23:30:50 +04:00
|
|
|
classNames: ['ghost-signout'],
|
|
|
|
|
2014-07-30 00:49:26 +04:00
|
|
|
afterModel: function (model, transition) {
|
2014-07-30 17:32:19 +04:00
|
|
|
this.notifications.clear();
|
2014-06-30 16:58:10 +04:00
|
|
|
if (Ember.canInvoke(transition, 'send')) {
|
|
|
|
transition.send('invalidateSession');
|
2014-07-25 17:38:13 +04:00
|
|
|
transition.abort();
|
2014-06-30 16:58:10 +04:00
|
|
|
} else {
|
|
|
|
this.send('invalidateSession');
|
|
|
|
}
|
2014-10-25 01:09:50 +04:00
|
|
|
}
|
2014-06-01 23:30:50 +04:00
|
|
|
});
|
|
|
|
|
2014-06-13 23:35:22 +04:00
|
|
|
export default SignoutRoute;
|