FIX: Switch Property to Computed
This commit is contained in:
parent
23ece34f53
commit
147b1350ea
|
@ -14,17 +14,20 @@ export default Ember.Component.extend({
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@computed("serve_id", "placement")
|
||||||
url: function() {
|
url: function() {
|
||||||
return (`//cdn.carbonads.com/carbon.js?serve=${this.get("serve_id")}&placement=${this.get("placement")}`).htmlSafe();
|
return (`//cdn.carbonads.com/carbon.js?serve=${this.get("serve_id")}&placement=${this.get("placement")}`).htmlSafe();
|
||||||
}.property("serve_id", "placement"),
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@computed("trust_level")
|
||||||
checkTrustLevels: function() {
|
checkTrustLevels: function() {
|
||||||
return !(
|
return !(
|
||||||
currentUser &&
|
currentUser &&
|
||||||
currentUser.get("trust_level") >
|
currentUser.get("trust_level") >
|
||||||
Discourse.SiteSettings.carbonads_through_trust_level
|
Discourse.SiteSettings.carbonads_through_trust_level
|
||||||
);
|
);
|
||||||
}.property("trust_level"),
|
},
|
||||||
|
|
||||||
@computed("checkTrustLevels")
|
@computed("checkTrustLevels")
|
||||||
showAd: function(checkTrustLevels) {
|
showAd: function(checkTrustLevels) {
|
||||||
|
|
Loading…
Reference in New Issue