mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
99dd49903d
no issue - add loading substates for all routes that previously blocked transitions until their model had finished loading - enables immediate response on navigation click - loading templates include the title bar to provide immediate indication of which page is loading - loading templates include a new `{{gh-loading-spinner}}` component that will only show the spinner after 200ms to avoid flashing a spinner for users on fast connections - updated Version Mismatch tests to match new behaviour of intermediate transitions when navigating
23 lines
717 B
JavaScript
23 lines
717 B
JavaScript
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
|
import styleBody from 'ghost-admin/mixins/style-body';
|
|
|
|
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|
titleToken: 'Settings - Apps',
|
|
|
|
classNames: ['settings-view-apps'],
|
|
|
|
beforeModel() {
|
|
this._super(...arguments);
|
|
return this.get('session.user')
|
|
.then(this.transitionAuthor())
|
|
.then(this.transitionEditor());
|
|
},
|
|
|
|
model() {
|
|
return this.store.query('setting', {type: 'blog,theme,private'}).then((records) => {
|
|
return records.get('firstObject');
|
|
});
|
|
}
|
|
});
|