mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 11:07:51 +08:00
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:

committed by
GitHub

parent
790a7e2095
commit
2ae21e9c35
@ -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) };
|
||||
|
||||
|
Reference in New Issue
Block a user