2014-06-05 07:18:23 +04:00
|
|
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
2014-07-25 11:52:17 +04:00
|
|
|
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
2014-09-23 17:04:49 +04:00
|
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
|
|
|
|
|
|
var SettingsGeneralRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, CurrentUserSettings, {
|
|
|
|
classNames: ['settings-view-general'],
|
2014-07-25 11:52:17 +04:00
|
|
|
|
|
|
|
beforeModel: function () {
|
|
|
|
return this.currentUser()
|
|
|
|
.then(this.transitionAuthor())
|
|
|
|
.then(this.transitionEditor());
|
|
|
|
},
|
2014-03-21 06:55:32 +04:00
|
|
|
|
|
|
|
model: function () {
|
2014-06-20 06:29:49 +04:00
|
|
|
return this.store.find('setting', { type: 'blog,theme' }).then(function (records) {
|
|
|
|
return records.get('firstObject');
|
2014-03-21 06:55:32 +04:00
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-06-20 06:29:49 +04:00
|
|
|
export default SettingsGeneralRoute;
|