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,5 +1,5 @@
import discourseComputed from "discourse-common/utils/decorators";
import Controller from "@ember/controller";
import computed from "ember-addons/ember-computed-decorators";
import { popupAjaxError } from "discourse/lib/ajax-error";
export default Controller.extend({
@ -7,13 +7,13 @@ export default Controller.extend({
embedding: null,
// show settings if we have at least one created host
@computed("embedding.embeddable_hosts.@each.isCreated")
@discourseComputed("embedding.embeddable_hosts.@each.isCreated")
showSecondary() {
const hosts = this.get("embedding.embeddable_hosts");
return hosts.length && hosts.findBy("isCreated");
},
@computed("embedding.base_url")
@discourseComputed("embedding.base_url")
embeddingCode(baseUrl) {
const html = `<div id='discourse-comments'></div>