Fixed linter error for use of {{action}} in editor-loading controller

refs https://github.com/TryGhost/Ghost/issues/14101

- `{{action}}` is deprecated and should be replaced with `{{on}}` and `{{fn}}` with direct use of methods
- switched to calling `ui.setMainClass` action directly
This commit is contained in:
Kevin Ansfield 2022-07-18 10:50:03 +01:00
parent a77388159c
commit 8d65303268
5 changed files with 3 additions and 10 deletions

View File

@ -1259,3 +1259,4 @@ remove|ember-template-lint|no-action|28|20|28|20|b96b7bd3d4b17c4761201d3a44c6876
remove|ember-template-lint|no-action|34|19|34|19|bb54609cede4c2f20ae22de5cbc2771d396aaaf4|1652054400000|1662422400000|1665014400000|lib/koenig-editor/addon/components/koenig-card-code.hbs
remove|ember-template-lint|no-action|55|20|55|20|ee695277e2f7dac9fbe5570ebfbe9c738280a976|1652054400000|1662422400000|1665014400000|lib/koenig-editor/addon/components/koenig-card-code.hbs
remove|ember-template-lint|require-input-label|31|8|31|8|615e3b52bcc28f911cc3b8e3630bd77324e357a6|1652054400000|1662422400000|1665014400000|lib/koenig-editor/addon/components/koenig-card-code.hbs
remove|ember-template-lint|no-action|1|34|1|34|d2485778c690a27dccd6859c3550b7e1d605975e|1652054400000|1662422400000|1665014400000|app/templates/editor/edit-loading.hbs

View File

@ -1,9 +1,5 @@
import Controller from '@ember/controller';
import classic from 'ember-classic-decorator';
import {inject as service} from '@ember/service';
/* eslint-disable ghost/ember/alias-model-in-controller */
@classic
export default class EditLoadingController extends Controller {
@service ui;
}

View File

@ -1,9 +1,5 @@
import Controller from '@ember/controller';
import classic from 'ember-classic-decorator';
import {inject as service} from '@ember/service';
/* eslint-disable ghost/ember/alias-model-in-controller */
@classic
export default class ReactEditLoadingController extends Controller {
@service ui;
}

View File

@ -1,4 +1,4 @@
<div class="gh-view" {{did-insert (action "setMainClass" "gh-main-white" target=this.ui)}}>
<div class="gh-view" {{did-insert (fn this.ui.setMainClass "gh-main-white")}}>
<div class="gh-content">
<GhLoadingSpinner />
</div>

View File

@ -1,4 +1,4 @@
<div class="gh-view" {{did-insert (action "setMainClass" "gh-main-white" target=this.ui)}}>
<div class="gh-view" {{did-insert (fn this.ui.setMainClass "gh-main-white")}}>
<div class="gh-content">
<GhLoadingSpinner />
</div>