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:
parent
6a1d7c7a18
commit
b4c3c6f20a
1 changed files with 6 additions and 0 deletions
|
@ -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'
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue