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,16 +1,16 @@
import discourseComputed from "discourse-common/utils/decorators";
import { reads } from "@ember/object/computed";
import Component from "@ember/component";
import computed from "ember-addons/ember-computed-decorators";
export default Component.extend({
editorId: reads("fieldName"),
@computed("fieldName")
@discourseComputed("fieldName")
currentEditorMode(fieldName) {
return fieldName === "css" ? "scss" : fieldName;
},
@computed("fieldName", "styles.html", "styles.css")
@discourseComputed("fieldName", "styles.html", "styles.css")
resetDisabled(fieldName) {
return (
this.get(`styles.${fieldName}`) ===
@ -18,7 +18,7 @@ export default Component.extend({
);
},
@computed("styles", "fieldName")
@discourseComputed("styles", "fieldName")
editorContents: {
get(styles, fieldName) {
return styles[fieldName];