DEV: Move computed to discourseComputed (#8312)

This commit is contained in:
Mark VanLandingham
2019-11-07 15:38:28 -06:00
committed by GitHub
parent d74546f50e
commit 6275c05c0d
395 changed files with 1770 additions and 1649 deletions

View File

@@ -1,15 +1,15 @@
import EmberObject from "@ember/object";
import computed from "ember-addons/ember-computed-decorators";
import discourseComputed from "discourse-common/utils/decorators";
import ValidState from "wizard/mixins/valid-state";
import { ajax } from "wizard/lib/ajax";
export default EmberObject.extend(ValidState, {
id: null,
@computed("index")
@discourseComputed("index")
displayIndex: index => index + 1,
@computed("fields.[]")
@discourseComputed("fields.[]")
fieldsById(fields) {
const lookup = {};
fields.forEach(field => (lookup[field.get("id")] = field));

View File

@@ -1,11 +1,11 @@
import Step from "wizard/models/step";
import WizardField from "wizard/models/wizard-field";
import { ajax } from "wizard/lib/ajax";
import computed from "ember-addons/ember-computed-decorators";
import discourseComputed from "discourse-common/utils/decorators";
import EmberObject from "@ember/object";
const Wizard = EmberObject.extend({
@computed("steps.length")
@discourseComputed("steps.length")
totalSteps: length => length,
getTitle() {