0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Check for server notifications on hard refresh

Closes #3612
- Trigger the loadServerNotifications event from the
  ApplicationRoute's afterModel hook, which gets called
  every time the app gets loaded.
This commit is contained in:
Jason Williams 2014-08-06 05:01:00 +00:00
parent 6a1d7c7a18
commit b4c3c6f20a

View file

@ -2,6 +2,12 @@ import ShortcutsRoute from 'ghost/mixins/shortcuts-route';
var ApplicationRoute = Ember.Route.extend(SimpleAuth.ApplicationRouteMixin, ShortcutsRoute, {
afterModel: function (model, transition) {
if (this.get('session').isAuthenticated) {
transition.send('loadServerNotifications');
}
},
shortcuts: {
'esc': 'closePopups'
},