mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Move computed to discourseComputed (#8312)
This commit is contained in:
committed by
GitHub
parent
d74546f50e
commit
6275c05c0d
@@ -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));
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user