mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
Merge pull request #4120 from halfdan/4116-settings-classes
Implements setting specific body classes
This commit is contained in:
commit
965d099b23
@ -1,6 +1,9 @@
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
var SettingsAboutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, {
|
||||
classNames: ['settings-view-about'],
|
||||
|
||||
var SettingsAboutRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, loadingIndicator, {
|
||||
cachedConfig: false,
|
||||
model: function () {
|
||||
var cachedConfig = this.get('cachedConfig'),
|
||||
|
@ -1,6 +1,9 @@
|
||||
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
var AppsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, CurrentUserSettings, {
|
||||
classNames: ['settings-view-apps'],
|
||||
|
||||
var AppsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, CurrentUserSettings, {
|
||||
beforeModel: function () {
|
||||
if (!this.get('config.apps')) {
|
||||
return this.transitionTo('settings.general');
|
||||
|
@ -1,7 +1,10 @@
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
var SettingsGeneralRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, loadingIndicator, CurrentUserSettings, {
|
||||
classNames: ['settings-view-general'],
|
||||
|
||||
var SettingsGeneralRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, loadingIndicator, CurrentUserSettings, {
|
||||
beforeModel: function () {
|
||||
return this.currentUser()
|
||||
.then(this.transitionAuthor())
|
||||
|
@ -1,4 +1,5 @@
|
||||
import PaginationRouteMixin from 'ghost/mixins/pagination-route';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
var paginationSettings = {
|
||||
page: 1,
|
||||
@ -6,7 +7,9 @@ var paginationSettings = {
|
||||
status: 'all'
|
||||
};
|
||||
|
||||
var UsersIndexRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, PaginationRouteMixin, {
|
||||
var UsersIndexRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, PaginationRouteMixin, {
|
||||
classNames: ['settings-view-users'],
|
||||
|
||||
setupController: function (controller, model) {
|
||||
this._super(controller, model);
|
||||
this.setupPagination(paginationSettings);
|
||||
|
@ -1,4 +1,8 @@
|
||||
var SettingsUserRoute = Ember.Route.extend({
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
|
||||
var SettingsUserRoute = Ember.Route.extend(styleBody, {
|
||||
classNames: ['settings-view-user'],
|
||||
|
||||
model: function (params) {
|
||||
var self = this;
|
||||
// TODO: Make custom user adapter that uses /api/users/:slug endpoint
|
||||
|
Loading…
Reference in New Issue
Block a user