This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/controllers/about.js.es6
Mark VanLandingham 2ae21e9c35
DEV: Import every instance of Ember.computed function (#8267)
* DEV: Import every instance of Ember.computed function

* export default for Ember.computed
2019-10-30 15:28:29 -05:00

28 lines
752 B
JavaScript

import { gt } from "@ember/object/computed";
import Controller from "@ember/controller";
import computed from "ember-addons/ember-computed-decorators";
export default Controller.extend({
faqOverriden: gt("siteSettings.faq_url.length", 0),
@computed
contactInfo() {
if (this.siteSettings.contact_url) {
return I18n.t("about.contact_info", {
contact_info:
"<a href='" +
this.siteSettings.contact_url +
"' target='_blank'>" +
this.siteSettings.contact_url +
"</a>"
});
} else if (this.siteSettings.contact_email) {
return I18n.t("about.contact_info", {
contact_info: this.siteSettings.contact_email
});
} else {
return null;
}
}
});