discourse/app/assets/javascripts/admin/controllers/admin-customize-themes.js

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

23 lines
614 B
JavaScript
Raw Normal View History

import Controller from "@ember/controller";
import discourseComputed from "discourse-common/utils/decorators";
2018-08-30 15:23:15 -04:00
import { THEMES } from "admin/models/theme";
export default Controller.extend({
2018-08-30 15:23:15 -04:00
currentTab: THEMES,
@discourseComputed("model", "model.@each.component")
fullThemes(themes) {
2018-08-30 15:23:15 -04:00
return themes.filter(t => !t.get("component"));
},
@discourseComputed("model", "model.@each.component")
childThemes(themes) {
return themes.filter(t => t.get("component"));
},
@discourseComputed("model", "model.@each.component")
installedThemes(themes) {
return themes.map(t => t.name);
}
});