From f07940f0e71c9b99805cb53c0b466852fb953fce Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 1 Feb 2022 17:03:45 +0000 Subject: [PATCH] Collapsed @service injection definitions to single-line style no issue - find+replace to make service injection style consistent and take up much less space at the top of files that used multi-line syntax --- ghost/admin/app/components/gh-alert.js | 3 +- ghost/admin/app/components/gh-alerts.js | 3 +- .../admin/app/components/gh-billing-iframe.js | 19 ++----- .../admin/app/components/gh-billing-modal.js | 3 +- .../components/gh-billing-update-button.js | 19 ++----- ghost/admin/app/components/gh-blog-url.js | 3 +- ghost/admin/app/components/gh-cm-editor.js | 3 +- .../admin/app/components/gh-content-cover.js | 3 +- .../app/components/gh-date-time-picker.js | 3 +- .../app/components/gh-dropdown-button.js | 3 +- ghost/admin/app/components/gh-dropdown.js | 3 +- ghost/admin/app/components/gh-editor.js | 7 +-- ghost/admin/app/components/gh-feature-flag.js | 3 +- .../app/components/gh-markdown-editor.js | 11 ++-- .../app/components/gh-member-settings-form.js | 18 +++---- .../admin/app/components/gh-mobile-nav-bar.js | 3 +- .../app/components/gh-nav-menu/footer.js | 19 ++----- .../admin/app/components/gh-nav-menu/main.js | 51 +++++-------------- ghost/admin/app/components/gh-notification.js | 3 +- .../admin/app/components/gh-notifications.js | 3 +- ghost/admin/app/components/gh-portal-links.js | 11 ++-- .../app/components/gh-post-settings-menu.js | 39 ++++---------- .../components/gh-post-settings-menu/email.js | 23 +++------ .../admin/app/components/gh-psm-tags-input.js | 3 +- .../app/components/gh-psm-template-select.js | 3 +- .../app/components/gh-psm-visibility-input.js | 7 +-- ghost/admin/app/components/gh-simplemde.js | 3 +- ghost/admin/app/components/gh-textarea.js | 3 +- .../app/components/gh-timezone-select.js | 3 +- ghost/admin/app/components/gh-url-preview.js | 3 +- ghost/admin/app/components/gh-user-invited.js | 7 +-- ghost/admin/app/components/gh-view-title.js | 3 +- .../app/components/modal-custom-view-form.js | 7 +-- .../app/components/settings/members-email.js | 17 ++----- ghost/admin/app/controllers/application.js | 31 +++-------- .../app/controllers/editor/edit-loading.js | 3 +- ghost/admin/app/controllers/pages-loading.js | 3 +- ghost/admin/app/controllers/posts-loading.js | 7 +-- ghost/admin/app/controllers/posts.js | 15 ++---- ghost/admin/app/controllers/settings.js | 7 +-- .../controllers/settings/code-injection.js | 7 +-- .../admin/app/controllers/settings/general.js | 27 +++------- .../app/controllers/settings/integration.js | 7 +-- .../app/controllers/settings/integrations.js | 11 ++-- .../controllers/settings/integrations/amp.js | 7 +-- .../settings/integrations/firstpromoter.js | 7 +-- .../settings/integrations/slack.js | 15 ++---- .../settings/integrations/unsplash.js | 7 +-- .../settings/integrations/zapier.js | 3 +- ghost/admin/app/controllers/settings/labs.js | 31 +++-------- .../app/controllers/settings/staff/index.js | 7 +-- ghost/admin/app/controllers/setup.js | 7 +-- ghost/admin/app/controllers/setup/two.js | 19 ++----- ghost/admin/app/controllers/signin.js | 23 +++------ ghost/admin/app/controllers/tag.js | 7 +-- ghost/admin/app/controllers/tags.js | 3 +- 56 files changed, 158 insertions(+), 411 deletions(-) diff --git a/ghost/admin/app/components/gh-alert.js b/ghost/admin/app/components/gh-alert.js index 9f870930b8..2568747b0c 100644 --- a/ghost/admin/app/components/gh-alert.js +++ b/ghost/admin/app/components/gh-alert.js @@ -9,8 +9,7 @@ import {inject as service} from '@ember/service'; @classNames('gh-alert') @tagName('article') export default class GhAlert extends Component { - @service - notifications; + @service notifications; @computed('message.type') get typeClass() { diff --git a/ghost/admin/app/components/gh-alerts.js b/ghost/admin/app/components/gh-alerts.js index 9f04039ec7..d23cfb66c8 100644 --- a/ghost/admin/app/components/gh-alerts.js +++ b/ghost/admin/app/components/gh-alerts.js @@ -8,8 +8,7 @@ import {inject as service} from '@ember/service'; @classNames('gh-alerts') @tagName('aside') export default class GhAlerts extends Component { - @service - notifications; + @service notifications; @alias('notifications.alerts') messages; diff --git a/ghost/admin/app/components/gh-billing-iframe.js b/ghost/admin/app/components/gh-billing-iframe.js index 5421ecdaab..e27e4e6bc0 100644 --- a/ghost/admin/app/components/gh-billing-iframe.js +++ b/ghost/admin/app/components/gh-billing-iframe.js @@ -5,20 +5,11 @@ import {inject as service} from '@ember/service'; @classic export default class GhBillingIframe extends Component { - @service - billing; - - @service - config; - - @service - ghostPaths; - - @service - ajax; - - @service - notifications; + @service billing; + @service config; + @service ghostPaths; + @service ajax; + @service notifications; isOwner = null; fetchingSubscription = false; diff --git a/ghost/admin/app/components/gh-billing-modal.js b/ghost/admin/app/components/gh-billing-modal.js index 5c23336c2b..cdf7202677 100644 --- a/ghost/admin/app/components/gh-billing-modal.js +++ b/ghost/admin/app/components/gh-billing-modal.js @@ -5,8 +5,7 @@ import {inject as service} from '@ember/service'; @classic export default class GhBillingModal extends Component { - @service - billing; + @service billing; @computed('billingWindowOpen') get visibilityClass() { diff --git a/ghost/admin/app/components/gh-billing-update-button.js b/ghost/admin/app/components/gh-billing-update-button.js index bf12904dff..1e3a7dfde7 100644 --- a/ghost/admin/app/components/gh-billing-update-button.js +++ b/ghost/admin/app/components/gh-billing-update-button.js @@ -6,20 +6,11 @@ import {inject as service} from '@ember/service'; @classic export default class GhBillingUpdateButton extends Component { - @service - router; - - @service - config; - - @service - ghostPaths; - - @service - ajax; - - @service - billing; + @service router; + @service config; + @service ghostPaths; + @service ajax; + @service billing; subscription = null; diff --git a/ghost/admin/app/components/gh-blog-url.js b/ghost/admin/app/components/gh-blog-url.js index c99706a345..f639e436c5 100644 --- a/ghost/admin/app/components/gh-blog-url.js +++ b/ghost/admin/app/components/gh-blog-url.js @@ -6,6 +6,5 @@ import {tagName} from '@ember-decorators/component'; @classic @tagName('') export default class GhBlogUrl extends Component { - @service - config; + @service config; } diff --git a/ghost/admin/app/components/gh-cm-editor.js b/ghost/admin/app/components/gh-cm-editor.js index bd36814698..6296085468 100644 --- a/ghost/admin/app/components/gh-cm-editor.js +++ b/ghost/admin/app/components/gh-cm-editor.js @@ -12,8 +12,7 @@ import {task} from 'ember-concurrency'; @classic @classNameBindings('isFocused:focus') class CmEditorComponent extends Component { - @service - lazyLoader; + @service lazyLoader; textareaClass = ''; isFocused = false; diff --git a/ghost/admin/app/components/gh-content-cover.js b/ghost/admin/app/components/gh-content-cover.js index 5bc7f82aee..0df5aaa5d0 100644 --- a/ghost/admin/app/components/gh-content-cover.js +++ b/ghost/admin/app/components/gh-content-cover.js @@ -18,8 +18,7 @@ import Component from '@ember/component'; @classic @classNames('content-cover') export default class GhContentCover extends Component { - @service - ui; + @service ui; click() { this.ui.closeMenus(); diff --git a/ghost/admin/app/components/gh-date-time-picker.js b/ghost/admin/app/components/gh-date-time-picker.js index d63ea37315..ee36070592 100644 --- a/ghost/admin/app/components/gh-date-time-picker.js +++ b/ghost/admin/app/components/gh-date-time-picker.js @@ -12,8 +12,7 @@ const DATE_FORMAT = 'YYYY-MM-DD'; @classic @tagName('') export default class GhDateTimePicker extends Component { - @service - settings; + @service settings; date = ''; dateFormat = DATE_FORMAT; diff --git a/ghost/admin/app/components/gh-dropdown-button.js b/ghost/admin/app/components/gh-dropdown-button.js index c88d99ac98..4e0b5b4b0f 100644 --- a/ghost/admin/app/components/gh-dropdown-button.js +++ b/ghost/admin/app/components/gh-dropdown-button.js @@ -9,8 +9,7 @@ import {inject as service} from '@ember/service'; @tagName('button') @attributeBindings('href', 'role', 'type') export default class GhDropdownButton extends Component.extend(DropdownMixin) { - @service - dropdown; + @service dropdown; role = 'button'; diff --git a/ghost/admin/app/components/gh-dropdown.js b/ghost/admin/app/components/gh-dropdown.js index 0c65cf11e9..9547389421 100644 --- a/ghost/admin/app/components/gh-dropdown.js +++ b/ghost/admin/app/components/gh-dropdown.js @@ -10,8 +10,7 @@ import {inject as service} from '@ember/service'; @classNames('dropdown') @classNameBindings('fadeIn:fade-in-scale:fade-out', 'isOpen:open:closed') export default class GhDropdown extends Component.extend(DropdownMixin) { - @service - dropdown; + @service dropdown; name = null; closeOnClick = false; diff --git a/ghost/admin/app/components/gh-editor.js b/ghost/admin/app/components/gh-editor.js index 4aa02be31a..3c3ed05c24 100644 --- a/ghost/admin/app/components/gh-editor.js +++ b/ghost/admin/app/components/gh-editor.js @@ -15,11 +15,8 @@ import {inject as service} from '@ember/service'; 'isPreview:gh-editor-preview' ) export default class GhEditor extends Component { - @service - feature; - - @service - ui; + @service feature; + @service ui; // Internal attributes droppedFiles = null; diff --git a/ghost/admin/app/components/gh-feature-flag.js b/ghost/admin/app/components/gh-feature-flag.js index d1614ba6e3..e031de451d 100644 --- a/ghost/admin/app/components/gh-feature-flag.js +++ b/ghost/admin/app/components/gh-feature-flag.js @@ -10,8 +10,7 @@ import {inject as service} from '@ember/service'; @classNames('switch') @attributeBindings('for', 'disabled') class FeatureFlagComponent extends Component { - @service - feature; + @service feature; @computed('_disabled') get disabled() { diff --git a/ghost/admin/app/components/gh-markdown-editor.js b/ghost/admin/app/components/gh-markdown-editor.js index 9ef2959e0d..7b60e2d1f7 100644 --- a/ghost/admin/app/components/gh-markdown-editor.js +++ b/ghost/admin/app/components/gh-markdown-editor.js @@ -21,14 +21,9 @@ import {inject as service} from '@ember/service'; '_isSplitScreen:gh-markdown-editor-side-by-side' ) export default class GhMarkdownEditor extends Component.extend(ShortcutsMixin) { - @service - config; - - @service - notifications; - - @service - settings; + @service config; + @service notifications; + @service settings; // Public attributes autofocus = false; diff --git a/ghost/admin/app/components/gh-member-settings-form.js b/ghost/admin/app/components/gh-member-settings-form.js index 9ba631aea7..2619d6aaec 100644 --- a/ghost/admin/app/components/gh-member-settings-form.js +++ b/ghost/admin/app/components/gh-member-settings-form.js @@ -7,18 +7,12 @@ import {task} from 'ember-concurrency-decorators'; import {tracked} from '@glimmer/tracking'; export default class extends Component { - @service - membersUtils - @service - ghostPaths - @service - ajax - @service - store - @service - feature - @service - settings + @service membersUtils + @service ghostPaths + @service ajax + @service store + @service feature + @service settings constructor(...args) { super(...args); diff --git a/ghost/admin/app/components/gh-mobile-nav-bar.js b/ghost/admin/app/components/gh-mobile-nav-bar.js index 1a1bf7ae56..63ede1fc4c 100644 --- a/ghost/admin/app/components/gh-mobile-nav-bar.js +++ b/ghost/admin/app/components/gh-mobile-nav-bar.js @@ -7,6 +7,5 @@ import {inject as service} from '@ember/service'; @tagName('nav') @classNames('gh-mobile-nav-bar') export default class GhMobileNavBar extends Component { - @service - ui; + @service ui; } diff --git a/ghost/admin/app/components/gh-nav-menu/footer.js b/ghost/admin/app/components/gh-nav-menu/footer.js index 145ae903d6..ee9a45b21f 100644 --- a/ghost/admin/app/components/gh-nav-menu/footer.js +++ b/ghost/admin/app/components/gh-nav-menu/footer.js @@ -6,20 +6,11 @@ import {inject as service} from '@ember/service'; @classic export default class Footer extends Component { - @service - config; - - @service - session; - - @service - router; - - @service - whatsNew; - - @service - feature; + @service config; + @service session; + @service router; + @service whatsNew; + @service feature; @and('config.clientExtensions.dropdown', 'session.user.isOwnerOnly') showDropdownExtension; diff --git a/ghost/admin/app/components/gh-nav-menu/main.js b/ghost/admin/app/components/gh-nav-menu/main.js index 44c1524fd0..02d32686ca 100644 --- a/ghost/admin/app/components/gh-nav-menu/main.js +++ b/ghost/admin/app/components/gh-nav-menu/main.js @@ -13,44 +13,19 @@ import {task} from 'ember-concurrency'; @classic @tagName('') export default class Main extends Component.extend(ShortcutsMixin) { - @service - billing; - - @service - config; - - @service - customViews; - - @service - feature; - - @service - ghostPaths; - - @service - modals; - - @service - navigation; - - @service - router; - - @service - session; - - @service - ui; - - @service - whatsNew; - - @service - membersStats; - - @service - settings; + @service billing; + @service config; + @service customViews; + @service feature; + @service ghostPaths; + @service modals; + @service navigation; + @service router; + @service session; + @service ui; + @service whatsNew; + @service membersStats; + @service settings; iconStyle = ''; iconClass = ''; diff --git a/ghost/admin/app/components/gh-notification.js b/ghost/admin/app/components/gh-notification.js index 4c353f16b5..ee0cc3e406 100644 --- a/ghost/admin/app/components/gh-notification.js +++ b/ghost/admin/app/components/gh-notification.js @@ -10,8 +10,7 @@ import {inject as service} from '@ember/service'; @classNames('gh-notification', 'gh-notification-passive') @classNameBindings('typeClass') export default class GhNotification extends Component { - @service - notifications; + @service notifications; message = null; diff --git a/ghost/admin/app/components/gh-notifications.js b/ghost/admin/app/components/gh-notifications.js index c2b8d80ea2..3902b8d786 100644 --- a/ghost/admin/app/components/gh-notifications.js +++ b/ghost/admin/app/components/gh-notifications.js @@ -8,8 +8,7 @@ import {inject as service} from '@ember/service'; @tagName('aside') @classNames('gh-notifications') export default class GhNotifications extends Component { - @service - notifications; + @service notifications; @alias('notifications.notifications') messages; diff --git a/ghost/admin/app/components/gh-portal-links.js b/ghost/admin/app/components/gh-portal-links.js index 35c078d253..4b37fcec0d 100644 --- a/ghost/admin/app/components/gh-portal-links.js +++ b/ghost/admin/app/components/gh-portal-links.js @@ -9,14 +9,9 @@ import {task, timeout} from 'ember-concurrency'; @classic @tagName('') export default class GhPortalLinks extends Component { - @service - config; - - @service - store; - - @service - settings; + @service config; + @service store; + @service settings; isLink = true; prices = null; diff --git a/ghost/admin/app/components/gh-post-settings-menu.js b/ghost/admin/app/components/gh-post-settings-menu.js index e8866f6653..2aa5852f41 100644 --- a/ghost/admin/app/components/gh-post-settings-menu.js +++ b/ghost/admin/app/components/gh-post-settings-menu.js @@ -10,35 +10,16 @@ import {tagName} from '@ember-decorators/component'; @classic @tagName('') export default class GhPostSettingsMenu extends Component { - @service - feature; - - @service - store; - - @service - config; - - @service - ajax; - - @service - ghostPaths; - - @service - notifications; - - @service - slugGenerator; - - @service - session; - - @service - settings; - - @service - ui; + @service feature; + @service store; + @service config; + @service ajax; + @service ghostPaths; + @service notifications; + @service slugGenerator; + @service session; + @service settings; + @service ui; post = null; isViewingSubview = false; diff --git a/ghost/admin/app/components/gh-post-settings-menu/email.js b/ghost/admin/app/components/gh-post-settings-menu/email.js index dafa71c4d0..8c1ef2c81e 100644 --- a/ghost/admin/app/components/gh-post-settings-menu/email.js +++ b/ghost/admin/app/components/gh-post-settings-menu/email.js @@ -13,23 +13,12 @@ const RETRY_EMAIL_MAX_POLL_LENGTH = 15 * 1000; @classic export default class Email extends Component { - @service - ajax; - - @service - ghostPaths; - - @service - notifications; - - @service - session; - - @service - settings; - - @service - config; + @service ajax; + @service ghostPaths; + @service notifications; + @service session; + @service settings; + @service config; post = null; sendTestEmailError = ''; diff --git a/ghost/admin/app/components/gh-psm-tags-input.js b/ghost/admin/app/components/gh-psm-tags-input.js index f211020e30..63e9f74052 100644 --- a/ghost/admin/app/components/gh-psm-tags-input.js +++ b/ghost/admin/app/components/gh-psm-tags-input.js @@ -8,8 +8,7 @@ import {tagName} from '@ember-decorators/component'; @classic @tagName('') export default class GhPsmTagsInput extends Component { - @service - store; + @service store; // public attrs post = null; diff --git a/ghost/admin/app/components/gh-psm-template-select.js b/ghost/admin/app/components/gh-psm-template-select.js index a235153cfc..ade754a9b6 100644 --- a/ghost/admin/app/components/gh-psm-template-select.js +++ b/ghost/admin/app/components/gh-psm-template-select.js @@ -9,8 +9,7 @@ import {task} from 'ember-concurrency'; @classic @tagName('') export default class GhPsmTemplateSelect extends Component { - @service - store; + @service store; post = null; diff --git a/ghost/admin/app/components/gh-psm-visibility-input.js b/ghost/admin/app/components/gh-psm-visibility-input.js index e74a892c77..67118bfaae 100644 --- a/ghost/admin/app/components/gh-psm-visibility-input.js +++ b/ghost/admin/app/components/gh-psm-visibility-input.js @@ -11,11 +11,8 @@ const VISIBILITIES = [ @classic export default class GhPsmVisibilityInput extends Component { - @service - settings; - - @service - feature; + @service settings; + @service feature; // public attrs post = null; diff --git a/ghost/admin/app/components/gh-simplemde.js b/ghost/admin/app/components/gh-simplemde.js index 35a7387c2b..f4450e63a2 100644 --- a/ghost/admin/app/components/gh-simplemde.js +++ b/ghost/admin/app/components/gh-simplemde.js @@ -10,8 +10,7 @@ import {task} from 'ember-concurrency'; @classic export default class GhSimplemde extends TextArea { - @service - lazyLoader; + @service lazyLoader; // Public attributes autofocus = false; diff --git a/ghost/admin/app/components/gh-textarea.js b/ghost/admin/app/components/gh-textarea.js index e6a5c0efe4..dca8ef93d3 100644 --- a/ghost/admin/app/components/gh-textarea.js +++ b/ghost/admin/app/components/gh-textarea.js @@ -8,8 +8,7 @@ import {inject as service} from '@ember/service'; @classic @classNames('gh-input') export default class GhTextarea extends TextArea.extend(TextInputMixin) { - @service - resizeDetector; + @service resizeDetector; autoExpand = false; diff --git a/ghost/admin/app/components/gh-timezone-select.js b/ghost/admin/app/components/gh-timezone-select.js index 0d6f176106..b6786f0555 100644 --- a/ghost/admin/app/components/gh-timezone-select.js +++ b/ghost/admin/app/components/gh-timezone-select.js @@ -9,8 +9,7 @@ import {inject as service} from '@ember/service'; @classic @classNames('form-group', 'for-select') export default class GhTimezoneSelect extends Component { - @service - clock; + @service clock; timezone = null; availableTimezones = null; diff --git a/ghost/admin/app/components/gh-url-preview.js b/ghost/admin/app/components/gh-url-preview.js index 3f61afaf64..3e9b4197d0 100644 --- a/ghost/admin/app/components/gh-url-preview.js +++ b/ghost/admin/app/components/gh-url-preview.js @@ -11,8 +11,7 @@ Example usage: @classic @classNames('ghost-url-preview') export default class GhUrlPreview extends Component { - @service - config; + @service config; prefix = null; slug = null; diff --git a/ghost/admin/app/components/gh-user-invited.js b/ghost/admin/app/components/gh-user-invited.js index 8a7f3d8535..1f17a2c1da 100644 --- a/ghost/admin/app/components/gh-user-invited.js +++ b/ghost/admin/app/components/gh-user-invited.js @@ -9,11 +9,8 @@ import {tagName} from '@ember-decorators/component'; @classic @tagName('') export default class GhUserInvited extends Component { - @service - notifications; - - @service - store; + @service notifications; + @service store; invite = null; isSending = false; diff --git a/ghost/admin/app/components/gh-view-title.js b/ghost/admin/app/components/gh-view-title.js index 04ce34ef8c..8c1accb3ed 100644 --- a/ghost/admin/app/components/gh-view-title.js +++ b/ghost/admin/app/components/gh-view-title.js @@ -7,6 +7,5 @@ import {inject as service} from '@ember/service'; @tagName('h2') @classNames('view-title') export default class GhViewTitle extends Component { - @service - ui; + @service ui; } diff --git a/ghost/admin/app/components/modal-custom-view-form.js b/ghost/admin/app/components/modal-custom-view-form.js index cc91b63eff..62485fedb3 100644 --- a/ghost/admin/app/components/modal-custom-view-form.js +++ b/ghost/admin/app/components/modal-custom-view-form.js @@ -7,11 +7,8 @@ import {task, timeout} from 'ember-concurrency'; @classic export default class ModalCustomViewForm extends ModalComponent { - @service - customViews; - - @service - router; + @service customViews; + @service router; delayedModelColor = ''; diff --git a/ghost/admin/app/components/settings/members-email.js b/ghost/admin/app/components/settings/members-email.js index 798134a073..4ac36af7ff 100644 --- a/ghost/admin/app/components/settings/members-email.js +++ b/ghost/admin/app/components/settings/members-email.js @@ -9,17 +9,10 @@ const EU = {flag: '🇪🇺', name: 'EU', baseUrl: 'https://api.eu.mailgun.net/v @classic export default class MembersEmail extends Component { - @service - config; - - @service - ghostPaths; - - @service - ajax; - - @service - settings; + @service config; + @service ghostPaths; + @service ajax; + @service settings; replyAddresses = null; recipientsSelectValue = null; @@ -229,4 +222,4 @@ export default class MembersEmail extends Component { return defaultEmailRecipients; } -} \ No newline at end of file +} diff --git a/ghost/admin/app/controllers/application.js b/ghost/admin/app/controllers/application.js index df13a5adb6..3751e04d04 100644 --- a/ghost/admin/app/controllers/application.js +++ b/ghost/admin/app/controllers/application.js @@ -7,29 +7,14 @@ import Controller from '@ember/controller'; @classic export default class ApplicationController extends Controller { - @service - billing; - - @service - config; - - @service - dropdown; - - @service - feature; - - @service - router; - - @service - session; - - @service - settings; - - @service - ui; + @service billing; + @service config; + @service dropdown; + @service feature; + @service router; + @service session; + @service settings; + @service ui; @reads('config.hostSettings.billing.enabled') showBilling; diff --git a/ghost/admin/app/controllers/editor/edit-loading.js b/ghost/admin/app/controllers/editor/edit-loading.js index d8524f9286..a10b6b4f41 100644 --- a/ghost/admin/app/controllers/editor/edit-loading.js +++ b/ghost/admin/app/controllers/editor/edit-loading.js @@ -5,6 +5,5 @@ import {inject as service} from '@ember/service'; /* eslint-disable ghost/ember/alias-model-in-controller */ @classic export default class EditLoadingController extends Controller { - @service - ui; + @service ui; } diff --git a/ghost/admin/app/controllers/pages-loading.js b/ghost/admin/app/controllers/pages-loading.js index 9c360b0fbc..c5ac136232 100644 --- a/ghost/admin/app/controllers/pages-loading.js +++ b/ghost/admin/app/controllers/pages-loading.js @@ -9,6 +9,5 @@ export default class PagesLoadingController extends PostsLoadingController { @controller('pages') postsController; - @service - ui; + @service ui; } diff --git a/ghost/admin/app/controllers/posts-loading.js b/ghost/admin/app/controllers/posts-loading.js index 0f4bdf13c3..cd874335a6 100644 --- a/ghost/admin/app/controllers/posts-loading.js +++ b/ghost/admin/app/controllers/posts-loading.js @@ -9,11 +9,8 @@ export default class PostsLoadingController extends Controller { @controller('posts') postsController; - @service - session; - - @service - ui; + @service session; + @service ui; @readOnly('postsController.availableTypes') availableTypes; diff --git a/ghost/admin/app/controllers/posts.js b/ghost/admin/app/controllers/posts.js index 6590bfb308..cba05d037d 100644 --- a/ghost/admin/app/controllers/posts.js +++ b/ghost/admin/app/controllers/posts.js @@ -49,17 +49,10 @@ const ORDERS = [{ @classic export default class PostsController extends Controller { - @service - feature; - - @service - session; - - @service - store; - - @service - settings; + @service feature; + @service session; + @service store; + @service settings; // default values for these are set in `init` and defined in `helpers/reset-query-params` queryParams = ['type', 'access', 'author', 'tag', 'order']; diff --git a/ghost/admin/app/controllers/settings.js b/ghost/admin/app/controllers/settings.js index f191c28438..f958c77084 100644 --- a/ghost/admin/app/controllers/settings.js +++ b/ghost/admin/app/controllers/settings.js @@ -6,11 +6,8 @@ import Controller from '@ember/controller'; @classic export default class SettingsController extends Controller { - @service - settings; - - @service - session; + @service settings; + @service session; showLeaveSettingsModal = false; diff --git a/ghost/admin/app/controllers/settings/code-injection.js b/ghost/admin/app/controllers/settings/code-injection.js index 20a4cf2e70..84c32253b3 100644 --- a/ghost/admin/app/controllers/settings/code-injection.js +++ b/ghost/admin/app/controllers/settings/code-injection.js @@ -7,11 +7,8 @@ import {task} from 'ember-concurrency'; @classic export default class CodeInjectionController extends Controller { - @service - notifications; - - @service - settings; + @service notifications; + @service settings; @action save() { diff --git a/ghost/admin/app/controllers/settings/general.js b/ghost/admin/app/controllers/settings/general.js index e7ed5ae1b1..55e2da4700 100644 --- a/ghost/admin/app/controllers/settings/general.js +++ b/ghost/admin/app/controllers/settings/general.js @@ -21,26 +21,13 @@ function randomPassword() { @classic export default class GeneralController extends Controller { - @service - config; - - @service - ghostPaths; - - @service - notifications; - - @service - session; - - @service - settings; - - @service - frontend; - - @service - ui; + @service config; + @service ghostPaths; + @service notifications; + @service session; + @service settings; + @service frontend; + @service ui; availableTimezones = null; imageExtensions = IMAGE_EXTENSIONS; diff --git a/ghost/admin/app/controllers/settings/integration.js b/ghost/admin/app/controllers/settings/integration.js index 1a614008fa..85c8b7c0ce 100644 --- a/ghost/admin/app/controllers/settings/integration.js +++ b/ghost/admin/app/controllers/settings/integration.js @@ -14,11 +14,8 @@ import {task, timeout} from 'ember-concurrency'; @classic export default class IntegrationController extends Controller { - @service - config; - - @service - ghostPaths; + @service config; + @service ghostPaths; imageExtensions = IMAGE_EXTENSIONS; imageMimeTypes = IMAGE_MIME_TYPES; diff --git a/ghost/admin/app/controllers/settings/integrations.js b/ghost/admin/app/controllers/settings/integrations.js index 8574898584..a81ea9acca 100644 --- a/ghost/admin/app/controllers/settings/integrations.js +++ b/ghost/admin/app/controllers/settings/integrations.js @@ -7,14 +7,9 @@ import {task} from 'ember-concurrency'; @classic export default class IntegrationsController extends Controller { - @service - settings; - - @service - store; - - @service - config; + @service settings; + @service store; + @service config; _allIntegrations = null; diff --git a/ghost/admin/app/controllers/settings/integrations/amp.js b/ghost/admin/app/controllers/settings/integrations/amp.js index 1f5f5f66bb..a898e23fad 100644 --- a/ghost/admin/app/controllers/settings/integrations/amp.js +++ b/ghost/admin/app/controllers/settings/integrations/amp.js @@ -7,11 +7,8 @@ import {task} from 'ember-concurrency'; @classic export default class AmpController extends Controller { - @service - notifications; - - @service - settings; + @service notifications; + @service settings; leaveSettingsTransition = null; diff --git a/ghost/admin/app/controllers/settings/integrations/firstpromoter.js b/ghost/admin/app/controllers/settings/integrations/firstpromoter.js index 4ea4f79eab..7ca8c92ccc 100644 --- a/ghost/admin/app/controllers/settings/integrations/firstpromoter.js +++ b/ghost/admin/app/controllers/settings/integrations/firstpromoter.js @@ -7,11 +7,8 @@ import {task} from 'ember-concurrency'; @classic export default class FirstpromoterController extends Controller { - @service - notifications; - - @service - settings; + @service notifications; + @service settings; leaveSettingsTransition = null; diff --git a/ghost/admin/app/controllers/settings/integrations/slack.js b/ghost/admin/app/controllers/settings/integrations/slack.js index 02a9a280b8..b5afc85bd4 100644 --- a/ghost/admin/app/controllers/settings/integrations/slack.js +++ b/ghost/admin/app/controllers/settings/integrations/slack.js @@ -10,17 +10,10 @@ import {task} from 'ember-concurrency'; @classic export default class SlackController extends Controller { - @service - ghostPaths; - - @service - ajax; - - @service - notifications; - - @service - settings; + @service ghostPaths; + @service ajax; + @service notifications; + @service settings; leaveSettingsTransition = null; slackArray = null; diff --git a/ghost/admin/app/controllers/settings/integrations/unsplash.js b/ghost/admin/app/controllers/settings/integrations/unsplash.js index 043e44e7ac..9c0310000b 100644 --- a/ghost/admin/app/controllers/settings/integrations/unsplash.js +++ b/ghost/admin/app/controllers/settings/integrations/unsplash.js @@ -7,11 +7,8 @@ import {task} from 'ember-concurrency'; @classic export default class UnsplashController extends Controller { - @service - notifications; - - @service - settings; + @service notifications; + @service settings; leaveSettingsTransition = null; diff --git a/ghost/admin/app/controllers/settings/integrations/zapier.js b/ghost/admin/app/controllers/settings/integrations/zapier.js index b4be166535..ac71343f13 100644 --- a/ghost/admin/app/controllers/settings/integrations/zapier.js +++ b/ghost/admin/app/controllers/settings/integrations/zapier.js @@ -10,8 +10,7 @@ import {task, timeout} from 'ember-concurrency'; @classic export default class ZapierController extends Controller { - @service - ghostPaths; + @service ghostPaths; selectedApiKey = null; isApiKeyRegenerated = false; diff --git a/ghost/admin/app/controllers/settings/labs.js b/ghost/admin/app/controllers/settings/labs.js index c30056798e..c05d5247fd 100644 --- a/ghost/admin/app/controllers/settings/labs.js +++ b/ghost/admin/app/controllers/settings/labs.js @@ -37,29 +37,14 @@ const YAML_MIME_TYPE = [ @classic export default class LabsController extends Controller { - @service - ajax; - - @service - config; - - @service - feature; - - @service - ghostPaths; - - @service - notifications; - - @service - session; - - @service - settings; - - @service - utils; + @service ajax; + @service config; + @service feature; + @service ghostPaths; + @service notifications; + @service session; + @service settings; + @service utils; importErrors = null; importSuccessful = false; diff --git a/ghost/admin/app/controllers/settings/staff/index.js b/ghost/admin/app/controllers/settings/staff/index.js index 160f1848ce..bf3bd40be3 100644 --- a/ghost/admin/app/controllers/settings/staff/index.js +++ b/ghost/admin/app/controllers/settings/staff/index.js @@ -9,11 +9,8 @@ import {task} from 'ember-concurrency'; @classic export default class IndexController extends Controller { - @service - session; - - @service - store; + @service session; + @service store; showInviteUserModal = false; showResetAllPasswordsModal = false; diff --git a/ghost/admin/app/controllers/setup.js b/ghost/admin/app/controllers/setup.js index e4efd3bec5..305b3ecac1 100644 --- a/ghost/admin/app/controllers/setup.js +++ b/ghost/admin/app/controllers/setup.js @@ -7,11 +7,8 @@ import Controller from '@ember/controller'; @classic export default class SetupController extends Controller { - @service - ghostPaths; - - @service - router; + @service ghostPaths; + @service router; @match('router.currentRouteName', /^setup\.(two|three)$/) showBackLink; diff --git a/ghost/admin/app/controllers/setup/two.js b/ghost/admin/app/controllers/setup/two.js index e27915bce2..f6996ca818 100644 --- a/ghost/admin/app/controllers/setup/two.js +++ b/ghost/admin/app/controllers/setup/two.js @@ -14,20 +14,11 @@ export default class TwoController extends Controller.extend(ValidationEngine) { @controller application; - @service - ajax; - - @service - config; - - @service - ghostPaths; - - @service - notifications; - - @service - session; + @service ajax; + @service config; + @service ghostPaths; + @service notifications; + @service session; // ValidationEngine settings validationType = 'setup'; diff --git a/ghost/admin/app/controllers/signin.js b/ghost/admin/app/controllers/signin.js index 074d15060c..d8a69c68c7 100644 --- a/ghost/admin/app/controllers/signin.js +++ b/ghost/admin/app/controllers/signin.js @@ -18,23 +18,12 @@ export default class SigninController extends Controller.extend(ValidationEngine @controller application; - @service - ajax; - - @service - config; - - @service - ghostPaths; - - @service - notifications; - - @service - session; - - @service - settings; + @service ajax; + @service config; + @service ghostPaths; + @service notifications; + @service session; + @service settings; submitting = false; loggingIn = false; diff --git a/ghost/admin/app/controllers/tag.js b/ghost/admin/app/controllers/tag.js index befffbb437..12099ad6c7 100644 --- a/ghost/admin/app/controllers/tag.js +++ b/ghost/admin/app/controllers/tag.js @@ -11,11 +11,8 @@ const SCRATCH_PROPS = ['name', 'slug', 'description', 'metaTitle', 'metaDescript @classic export default class TagController extends Controller { - @service - notifications; - - @service - router; + @service notifications; + @service router; showDeleteTagModal = false; diff --git a/ghost/admin/app/controllers/tags.js b/ghost/admin/app/controllers/tags.js index 23bc262737..ce045f1eec 100644 --- a/ghost/admin/app/controllers/tags.js +++ b/ghost/admin/app/controllers/tags.js @@ -6,8 +6,7 @@ import {inject as service} from '@ember/service'; @classic export default class TagsController extends Controller { - @service - router; + @service router; queryParams = ['type']; type = 'public';