DEV: Import every instance of Ember.computed function (#8267)

* DEV: Import every instance of Ember.computed function

* export default for Ember.computed
This commit is contained in:
Mark VanLandingham
2019-10-30 15:28:29 -05:00
committed by GitHub
parent 790a7e2095
commit 2ae21e9c35
153 changed files with 621 additions and 434 deletions

View File

@ -1,11 +1,12 @@
import { alias, map } from "@ember/object/computed";
import Controller from "@ember/controller";
import { default as computed } from "ember-addons/ember-computed-decorators";
import { escapeExpression } from "discourse/lib/utilities";
export default Controller.extend({
sample: Ember.computed.alias("model.sample"),
errors: Ember.computed.alias("model.errors"),
count: Ember.computed.alias("model.grant_count"),
sample: alias("model.sample"),
errors: alias("model.errors"),
count: alias("model.grant_count"),
@computed("count", "sample.length")
countWarning(count, sampleLength) {
@ -34,7 +35,7 @@ export default Controller.extend({
return output;
},
processedSample: Ember.computed.map("model.sample", grant => {
processedSample: map("model.sample", grant => {
let i18nKey = "admin.badges.preview.grant.with";
const i18nParams = { username: escapeExpression(grant.username) };