mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -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
9fb34d6b27
commit
fb64de54f6
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, {
|
var ApplicationRoute = Ember.Route.extend(SimpleAuth.ApplicationRouteMixin, ShortcutsRoute, {
|
||||||
|
|
||||||
|
afterModel: function (model, transition) {
|
||||||
|
if (this.get('session').isAuthenticated) {
|
||||||
|
transition.send('loadServerNotifications');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
shortcuts: {
|
shortcuts: {
|
||||||
'esc': 'closePopups'
|
'esc': 'closePopups'
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue