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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
534 B
Plaintext
Raw Normal View History

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