discourse/app/assets/javascripts/admin/controllers/admin-site-settings-categor...

17 lines
447 B
JavaScript

import computed from "ember-addons/ember-computed-decorators";
export default Ember.Controller.extend({
categoryNameKey: null,
adminSiteSettings: Ember.inject.controller(),
@computed("adminSiteSettings.model", "categoryNameKey")
category(categories, nameKey) {
return (categories || []).findBy("nameKey", nameKey);
},
@computed("category")
filteredContent(category) {
return category ? category.siteSettings : [];
}
});