mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Removed unused body classes added by using the StyleBody mixin
no issue - many routes were attaching classes to the `<body>` tag via the `StyleBody` mixin but those classes were never used and applied inconsistently throughout the app
This commit is contained in:
parent
a0081a438c
commit
9186c84e64
@ -1,8 +1,5 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, {
|
||||
titleToken: 'About',
|
||||
|
||||
classNames: ['view-about']
|
||||
export default AuthenticatedRoute.extend({
|
||||
titleToken: 'About'
|
||||
});
|
||||
|
@ -1,13 +1,11 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
settings: service(),
|
||||
|
||||
titleToken: 'Settings - Code injection',
|
||||
classNames: ['settings-view-code'],
|
||||
|
||||
beforeModel() {
|
||||
this._super(...arguments);
|
||||
|
@ -2,14 +2,12 @@ import $ from 'jquery';
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
||||
import RSVP from 'rsvp';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
settings: service(),
|
||||
|
||||
titleToken: 'Settings - Design',
|
||||
classNames: ['settings-view-design'],
|
||||
|
||||
beforeModel() {
|
||||
this._super(...arguments);
|
||||
|
@ -1,13 +1,11 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
router: service(),
|
||||
|
||||
titleToken: 'Settings - Integrations',
|
||||
classNames: ['settings-view-integration'],
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
@ -1,13 +1,11 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
settings: service(),
|
||||
|
||||
titleToken: 'Settings - Integrations',
|
||||
classNames: ['settings-view-integrations'],
|
||||
|
||||
beforeModel() {
|
||||
this._super(...arguments);
|
||||
|
@ -1,13 +1,11 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
settings: service(),
|
||||
|
||||
titleToken: 'AMP',
|
||||
classNames: ['settings-view-integrations-amp'],
|
||||
|
||||
beforeModel() {
|
||||
this._super(...arguments);
|
||||
|
@ -1,13 +1,11 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import CurrentUserSettings from '../../../mixins/current-user-settings';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
settings: service(),
|
||||
|
||||
titleToken: 'Slack',
|
||||
classNames: ['settings-view-integrations-slack'],
|
||||
|
||||
beforeModel() {
|
||||
this._super(...arguments);
|
||||
|
@ -1,15 +1,13 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import CurrentUserSettings from '../../../mixins/current-user-settings';
|
||||
import UnsplashObject from 'ghost-admin/models/unsplash-integration';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
config: service(),
|
||||
settings: service(),
|
||||
|
||||
titleToken: 'Unsplash',
|
||||
classNames: ['settings-view-integrations-unsplash'],
|
||||
|
||||
// reload settings to ensure we have latest values and pre-configure
|
||||
// Unsplash to be active if the server doesn't have any unsplash setting
|
||||
|
@ -1,13 +1,11 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
settings: service(),
|
||||
|
||||
titleToken: 'Settings - Labs',
|
||||
classNames: ['settings'],
|
||||
|
||||
beforeModel() {
|
||||
this._super(...arguments);
|
||||
|
@ -1,14 +1,11 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, {
|
||||
export default AuthenticatedRoute.extend({
|
||||
notifications: service(),
|
||||
|
||||
titleToken: 'Sign Out',
|
||||
|
||||
classNames: ['ghost-signout'],
|
||||
|
||||
afterModel(/*model, transition*/) {
|
||||
this.notifications.clearAll();
|
||||
this.session.invalidate();
|
||||
|
@ -1,11 +1,8 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, {
|
||||
export default AuthenticatedRoute.extend({
|
||||
titleToken: 'Site',
|
||||
|
||||
classNames: ['view-site'],
|
||||
|
||||
model() {
|
||||
return (new Date()).valueOf();
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||||
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
||||
import styleBody from 'ghost-admin/mixins/style-body';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
infinity: service(),
|
||||
session: service(),
|
||||
|
||||
titleToken: 'Staff',
|
||||
classNames: ['view-team'],
|
||||
|
||||
model() {
|
||||
return this.session.user;
|
||||
|
@ -1,13 +1,10 @@
|
||||
/* eslint-disable camelcase */
|
||||
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, {
|
||||
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
||||
titleToken: 'Staff - User',
|
||||
|
||||
classNames: ['team-view-user'],
|
||||
|
||||
model(params) {
|
||||
return this.store.queryRecord('user', {slug: params.user_slug, include: 'count.posts'});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user