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

19 lines
548 B
Plaintext
Raw Normal View History

import discourseComputed from "discourse-common/utils/decorators";
2019-10-29 13:31:44 -04:00
import { inject } from "@ember/controller";
import Controller from "@ember/controller";
export default Controller.extend({
categoryNameKey: null,
adminSiteSettings: inject(),
@discourseComputed("adminSiteSettings.visibleSiteSettings", "categoryNameKey")
category(categories, nameKey) {
return (categories || []).findBy("nameKey", nameKey);
},
@discourseComputed("category")
filteredContent(category) {
return category ? category.siteSettings : [];
}
});