mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
23 lines
669 B
JavaScript
23 lines
669 B
JavaScript
import Ember from 'ember';
|
|
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
|
|
|
var SignoutRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, {
|
|
titleToken: 'Sign Out',
|
|
|
|
classNames: ['ghost-signout'],
|
|
|
|
afterModel: function (model, transition) {
|
|
this.notifications.clear();
|
|
if (Ember.canInvoke(transition, 'send')) {
|
|
transition.send('invalidateSession');
|
|
transition.abort();
|
|
} else {
|
|
this.send('invalidateSession');
|
|
}
|
|
}
|
|
});
|
|
|
|
export default SignoutRoute;
|